5

I'm trying to backup my MediaWiki instance. I'd like to do it completely, meaning that if the web server exploded suddenly, with the backup files, I can restore the MediaWiki instance completely to its state when the backup was created. The best reference so far I found is https://www.mediawiki.org/wiki/Fullsitebackup . Just want to check with experienced MediaWiki administrators if this is up-to-date and complete, or if it's even the best/right reference.

1
  • What about completely downloading your installation...?
    – William
    Sep 13, 2014 at 9:49

1 Answer 1

2

The fullsitebackup script looks fine but it might not work on all systems. It's dumping the database and it's compressing the files in a tar file.

As with any backup script and system the best way to know if it works is to take the backup, set it up on a fresh machine and see if everything works as usual.

It's worth learning some basic shell scripting if you're managing websites for which you need to assure proper backups. I usually set up my backup systems with some shell code, with a little help from backupninja for the database dumps.

For MediaWiki systems it makes sense to "split up" the backup in different parts. I prefer to

  1. move code into htdocs or html directory
  2. keep code in a git repository at GitHub (excluding images and dumps),
  3. nightly dump database into a directory not accessible through webserver (e.g. Apache)
  4. rsync everything to somewhere else
  5. I have a scripts directory to manage all this

I'm also running several MediaWiki instances from one code base. I might open up some of this code if there's enough interest (from me or others).

2
  • For running multiple MediaWiki instances, how to keep the sharable configuration choices synced across these instances? When making a change in LocalSettings.php, do you manually do the same change in LocalSettings.php for all the MW instances?
    – qazwsx
    Sep 16, 2014 at 7:07
  • Shared stuff is the same, stuff that differs I keep in $wgFarmVariables = array('1.example.com' => array( 'sharedUsers' => true), '2.example.com' => array('wgFarmSemantic' => true));, which I then run through if (array_key_exists(wiki_yt_host(), $wgFarmVariables)) { foreach ($wgFarmVariables[wiki_yt_host()] as $name => $value) { $$name = $value; } }. (You're welcome to ask another question about this for follow up.)
    – the
    Sep 16, 2014 at 7:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.