Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a 3 apache2 / tomcat servers in a load balanced setup. Each tomcat server is connecting to a MySQL v5.0 database (all 3 share it).

I created on the same network a MySQL v5.5 semisynchronus setup (1 master 2 slaves) they're all up an running and contain the same DB schema as the v5.0 DB but without the data.

I need to migrate all the data from the old DB to the new Master and have the tomcat servers use the new jdbc URL to connect to the semisynchronus DB set up.

Is there a way to do this without having stop the webservers? Mainly like so ...

Put 2 webservers in maintenance mode and rout all traffic to 1 webserver. I can then change the connection pool settings on those 2. Is it then possible to do a "FLUSH TABLES WITH READ LOCK" to do a mysqldump, and then restore the data on the semisync master, then once done I enable the 2 tomcats (with updated connection pool settings) to take the incoming traffic ?

share|improve this question

No need to setup MySQL replication on the different nodes and then migrate your data. Percona has a great tool called Xtrabackup which can be used to setup a slave for replication with nearly no downtime. Give it a try.

share|improve this answer
Don't I have to pay money for that? – george_h Sep 6 '12 at 14:05
Sure. Percona XtraBackup is an open-source hot backup utility for MySQL... – quanta Sep 6 '12 at 15:12
Nice, I have Percona's "Effective MySQL" book but haven't heard of XtrBackup. I'll try it out since I don't need to purchase anything for it. I still think though I may have some downtime when backing up and restoring the DB before switching. – george_h Sep 6 '12 at 20:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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