This is all the obvious method, but the key thing I want to note is that it actually works smoothly just as you would expect :-)
Our intranet wiki is MediaWiki 1.13 using MySQL on a Solaris 10 box, which is our general internal-use database server. Oracle runs on the same box and decided to fill /data last week, breaking MySQL and hence the wiki we use for the instructions on how to fix the box ...
So I set up something to mirror it.
1. Install 1.17b1 on a RHEL 5 VM (that we already have a copy of MediaWiki 1.15 on). Defaults are fine. 2. Put this script in the maintenance directory of the first box (server names anonymised), using your full paths to php and scp, run it from cron at 5am every day:
#!/usr/bin/bash cd /data/apache/mediawiki-1.13.3/maintenance /usr/local/bin/php dumpBackup.php --full >dump.xml /usr/bin/scp dump.xml admin@box2.internal.example.com:/usr/local/apache2/htdocs/techwiki/maintenance
3. Put the ssh key for the first box user the script runs as in ~admin/.ssh/authorized_keys on the second box, so the scp runs unattended. 4. Put this script in the maintenance directory of the second box, using your full path to php, run it from cron at 6am every day:
#!/bin/bash cd /usr/local/apache2/htdocs/techwiki/maintenance /usr/bin/php importDump.php dump.xml /usr/bin/php rebuildrecentchanges.php
This doesn't copy images or files - we don't use images much at all. That can come later if we care :-) Looking a bit broken may well be a feature in this context ...
I put a notice in MediaWiki:Sitenotice and MediaWiki:Anonnotice on the mirror copy that this was a read-only mirror, and disabled editing for everyone who wasn't me.
(and yes, I have vague plans to update the wiki from 1.13. OTOH, MediaWiki on Solaris is so stupidly painful in my experience that I advise no-one do it ever.)
- d.
David Gerard wrote:
This is all the obvious method, but the key thing I want to note is that it actually works smoothly just as you would expect :-)
Our intranet wiki is MediaWiki 1.13 using MySQL on a Solaris 10 box, which is our general internal-use database server. Oracle runs on the same box and decided to fill /data last week, breaking MySQL and hence the wiki we use for the instructions on how to fix the box ...
So I set up something to mirror it.
- Install 1.17b1 on a RHEL 5 VM (that we already have a copy of
MediaWiki 1.15 on). Defaults are fine. 2. Put this script in the maintenance directory of the first box (server names anonymised), using your full paths to php and scp, run it from cron at 5am every day:
#!/usr/bin/bash cd /data/apache/mediawiki-1.13.3/maintenance /usr/local/bin/php dumpBackup.php --full>dump.xml /usr/bin/scp dump.xml admin@box2.internal.example.com:/usr/local/apache2/htdocs/techwiki/maintenance
- Put the ssh key for the first box user the script runs as in
~admin/.ssh/authorized_keys on the second box, so the scp runs unattended. 4. Put this script in the maintenance directory of the second box, using your full path to php, run it from cron at 6am every day:
#!/bin/bash cd /usr/local/apache2/htdocs/techwiki/maintenance /usr/bin/php importDump.php dump.xml /usr/bin/php rebuildrecentchanges.php
This doesn't copy images or files - we don't use images much at all. That can come later if we care :-) Looking a bit broken may well be a feature in this context ...
That won't provide a full backup (eg. user list). I think you should have used mysqldump instead. Of course, the best mirror would be one that actually replicated from the master...
I put a notice in MediaWiki:Sitenotice and MediaWiki:Anonnotice on the mirror copy that this was a read-only mirror, and disabled editing for everyone who wasn't me.
(and yes, I have vague plans to update the wiki from 1.13. OTOH, MediaWiki on Solaris is so stupidly painful in my experience that I advise no-one do it ever.)
Why so? Is PHP code different in Solaris?
On 9 June 2011 23:09, Platonides Platonides@gmail.com wrote:
David Gerard wrote:
This doesn't copy images or files - we don't use images much at all. That can come later if we care :-) Looking a bit broken may well be a feature in this context ...
That won't provide a full backup (eg. user list). I think you should have used mysqldump instead. Of course, the best mirror would be one that actually replicated from the master...
It's a crappy, read-only copy, it'll do. The main machine is backed up nightly as well (and MySQL dumped properly), if we needed that we could get it.
But sure, more stuff can be done :-)
(and yes, I have vague plans to update the wiki from 1.13. OTOH, MediaWiki on Solaris is so stupidly painful in my experience that I advise no-one do it ever.)
Why so? Is PHP code different in Solaris?
Dependency hell setting stuff up.You really would not believe the faff required to hand-resolve all the dependencies for ImageMagick or rsvg, for example. Linux users have it *so easy*. Blastwave or OpenCSW would probably alleviate the pain, but I prefer to Just Say No if someone asks me for MediaWiki on a Solaris box.
- d.
mediawiki-l@lists.wikimedia.org