If you want to backup a wiki yourself, there are a few options.
You can take a snapshot of the database periodically; restoring from one of these is the quickest way to get back on line in case of data loss.
MediaWiki 1.5 and above includes a command-line maintenance script dumpBackup.php  which can be used to produce XML dumps directly, with or without page history.
The scripts which manage our multi-database dump process are available in our source repository but would need some tweaking to be used outside of Wikimedia.
You can generate dumps from public wikis using WikiTeam tools.