Monday, 2 March 2009

Backing up a wiki

The idea of a wiki, that of an easily usable collaborative space for collecting information is a good one. This is something which is shown by the widespread usage wikis have these days.

I've been contributing to wikis of various sorts over the years. But the thing is that they are hosted by someone else and that hosting inevitably goes away at some point. The wiki is then lost and all that effort is wasted. Of course, the real point is really that all the information in that wiki is lost.

So these days, to have confidence in a wiki, there needs to be the ability to obtain backups of the information. In the event the wiki goes away, a contributer has the knowledge that their efforts are not lost and that they have the ability to bring it back.

Getting involved again

One wiki which caught my interest last year, is the Procedural Content Generation (PCG) wiki. It's hosted at Wikidot, an ad-free wiki hosting site. Interestingly, in copying that link from my browser address bar, I noticed their latest news item disappointly alluded to testing ads on free sites.

In any case, before I got too involved in the PCG wiki, I needed to know I could get snapshots of the wiki content. Apparently, it was possible for site administrators to back up the wiki to a zip archive. I emailed the wiki creator, Andrew Doull, and asked him if he could set up a backup process which stored these archives periodically. His response was to give my account guest administrator status, so that I could backup the site myself, as needs be.

Back to backups

Backups just never happen as often as they should. I've been a member of the wiki, occasionally contributing, since the 8th of November 2008 (112 days) and I still haven't made any backups of the site. Encountering the ads on free wikis news item, doesn't give me any confidence in the future of the Wikidot service either.

So how to back up?

Searching the wiki

Look on the PCG wiki pages themselves for likely options. I looked and looked, and was unable to find the option. As far as I could recall, it was supposed to be in the site management section, but bugger me if I could find such a thing.

Searching the account page

The next step was checking out my account page. The most likely option is called 'Sites & membership', and clicking on it expanded menu options below it.

A false lead
Unfortunately, the only links go straight to the wiki itself. No backup option in site.

Searching the web

I must have searched for over ten minutes, using both Google and the Wikidot site search as well. Pretty much every reference to being able to do a backup of a wiki just alludes to it. No instructions how. There are references to a 'Site Manager', but no note of how to find it.

Finally, I stumbled on this page. Wait, there's a second set of documentation and a second FAQ? Why is the official set so unhelpful?

In any case, the other FAQ included a reference to the 'Site Manager' with a hint how to access it:

have a look in Site manager ( "admin:manage" )
admin:manage is very similar to a wiki link. Success, pcg.wikidot.com/admin:manage does the trick.

There's a 'Backup' page, and within it the option to 'Create a new backup' (the current one is quite old).

A new backup is in progress
Refreshing the page, a neglible minute or so later showed the following.

A newly created backup
Inside the backup archive, which is always named backup.zip, are two directories. files and source. Under the files directory, there's a subdirectory for each page which has attached files. And in that subdirectory, those attached files can be found. Under the source directory, there are .txt files which contain the contents of each wiki page that exists, where that content is in wiki markup.


All in all, a more than decent wiki backup system. In an ideal world, it would be nice if there were the option to automate this, and expose the created backups for normal users to download. But this is a free service, and a pretty decent one. It's unreasonable to expect this level of custom functionality from Wikidot.