Re: [Koha-devel] [Koha] How to update two koha databases in different servers.
Yes, easiest method, doing realtime updates, is mysql replication. Now, theres two methods of doing this, first is using mysql's own replication method, and second is using MySQL::Replication as found on cpan. Brilliant perl based replication system. ________________________________ From: otuoma peter <otuomathegreat@yahoo.com> To: "koha@lists.katipo.co.nz" <koha@lists.katipo.co.nz> Sent: Saturday, 11 May 2013 10:57 PM Subject: [Koha] How to update two koha databases in different servers. I have two koha installations. One on a production server and another on a standby back-up server. Is there a way I can have all the changes made to the database on the production server also updated to the standby back-up server? I am thinking of doing it using an entry in a cronjob file that runs once everyday at night. If possible, I only need to import the updates. Thanks in advance. _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Op 12-05-13 03:00, Waylon Robertson schreef:
Yes, easiest method, doing realtime updates, is mysql replication. Now, theres two methods of doing this, first is using mysql's own replication method, and second is using MySQL::Replication as found on cpan. Brilliant perl based replication system.
Be aware that replication is not a backup*. It's good for hot/warm standby in the case that the primary fails, however if you typo on the databased and drop a table you didn't want to, you can't restore that from a replicated slave as the typo will be replicated too. What we do is have daily snapshots (which are automatically created by the packages in /var/spool/koha) synced off the Koha servers and included as part of our standard server backup régime. I've also set up a system for a client that took the dump from their production site and restored it onto their staging server every week or so, so they have a place they can experiment with. This wasn't hard at all to automate with a cron job (a copy of the database is put in a location apache can access, protected with .htpasswd, the staging server fetches it when it wants to and replaces the current database with the new one.) What you need, of these options, is certainly dependent on your requirements, and it's quite possible replication is what you want. But don't forget about backups, too. Robin. * I'm not actually claiming that you said this, but it's a common thing to hear people say things like "oh, I have backups: the server replicates/has RAID", which is a code for them saying that they don't have backups :)
participants (2)
-
Robin Sheat -
Waylon Robertson