Here is what we do for about 40 wikis residing on a primary server is to
back then up, using rsync, to a secondary server that acts as a "hot
spare" should the primary server go down:
Servers:
Primary wiki server (Linux, Apache, PHP)
Secondary wiki server (Linux, Apache, PHP)
Replicated MySQL database server (Linux, MySQL 5.1)
-Rsync is used to copy the wiki software for each wiki from the primary
to the secondary server. This ensures changes, such as configuration
changes, updates, and uploaded images, are transferred to the secondary
each day. We rsync the whole wiki directory. No separate copies or
modifications to the secondary's wiki software is necessary.
-The database is a separate replicated database with its own backup.
The secondary wiki server points to the same database as the primary
wiki server, essentially making the secondary server a clone. This
allows the wiki code, especially the LocalSettings.php file for each
wiki, to be identical on the primary and secondary wiki servers.
So in theory you could go to either the primary or secondary wiki server
to use a wiki but we have our users use the primary only at this time.
We have considered load balancing the primary and secondary but for now
we're just using the secondary as a hot spare. The secondary server
also acts as our test server, receiving updates first in order to test
before we put them on the primary.
Our disaster plan looks like the following:
-Primary server dies: Have users go to the secondary server (Change a
DNS c-name that points to the primary to now point to the secondary
server). The only potential losses are image uploads and configuration
changes (rare) made that day before the crash. Once the primary is
fixed/replaced, it becomes the secondary. The secondary server (now new
primary server), which does not run rsync, will need to have that
software, which is also rsynced from the primary each day but in an
inactive state, activated.
-Database server dies: Our MySQL servers are two Linux MySQL servers
configured as master/slave. If one dies the other continue to run so no
downtime while we fix/replace the dead server. If both servers die
(e.g., fire, etc), we would need to build a new MySQL server and recover
the databases from backups done twice daily using mysqldump.
I'm not sure about your idea to copy the database each day from one
server to the other. I'm no DB expert but I would imagine it would
invite corruption or other problems. I think a separate DB server
(single or replicated) that both wiki servers point to would make life
easier.
Hope this helps...
-Jim
-----Original Message-----
From: j2k [mailto:jacko2000@gmail.com]
Sent: Monday, April 07, 2008 9:18 AM
To: MediaWiki announcements and site admin list
Subject: [Mediawiki-l] How to make a contunuosly updating clone of a
wiki?
Hi!
We have a wiki in our company, and we want a backup wiki server. How can
I do this? My first thought is, that I install a new mediawiki with the
same settings on the second server, then set automatic tasks to copy the
images folder regularly, dump the source wiki databases, and import them
at the destination server.
It is a practicable concept, or there are better methods? E.g. mysql
replication, etc. Google didn't helped me (or I questioned it badly :).
Regards,
Akos Szabo
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l