DB Management with multiple data centers

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
ilikepie's picture

Hi there,

We had a second site in the cloud that has all of our sites set up and ready to go with a quick DNS change. MySQL is kept up to date with replication over an SSH tunnel, and we use lsync to keep the files in sync. The problem that I'm seeing is that, if we switch to the disaster recovery/second site and new data starts to be written to MySQL on the slave server, what would be the best workflow for returning this data back to the primary site?

I was thinking that part of an "undo DR" site script would be to mysqldump --add-drop-table each database, scp to the master server, and import. Since way the slaves would drop the tables and prevent duplicate entries, and the newer data from the 2nd site would be pulled into place on the primary site.

Should I be thinking of another way to do this? FWIW, I'm not terribly interested in using exotic setups like master-master over a VPN or something.

In fact, is there anyone using multiple data centers for production websites? How do you keep your data in sync (more concerned with MySQL data than the file system, since there are multiple solutions already)?

Comments

Failback is always one of the

jburnett's picture

Failback is always one of the most complicated parts of a failover scenario. We perform replication between or Dallas and Atlant facilities and run fallback in much the same way you describe above. Another option is to grab the bin logs from the time of the failure, read them in and re-establish replication.

MySQL

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week