1

I need to perform some steps, I have to migrate our company live DB to a new server, if I use normal way such as lock table, mysqldump, scp, mysql restore, it take around 5-6 hours, so I want to make it quicker by those steps: ( note that i already have master/slave replication on backup server )

1- take full mysql backup from backup server and write down pos.

2- restore backup from previous step in the new DB server.

3- create master/slave replication between old & new Live DB from pos I took from step 1.

4- lock write on Live DB.

5- ensure that new Live DB are up to date (how to ?).

6- publish new Live DB server.

so steps from 1 to 3 take whatever it take but my Live DB still working, and i will take around 1/2 an hour between steps from 4 to 6, is my theory working well ?, any suggestion ? also how to ensure that my new Live DB are up to date, i think like when there is no one write on master db (by lock write on DB) the current pos Counter on slave db stop counting..?

1 Answer 1

0

If you already have LVM set up on the disk subsystem use it. Else, see:

MYSQL DATABASE BACKUP
How can I optimize a mysqldump of a large database?
https://www.percona.com/blog/2006/08/21/using-lvm-for-mysql-backup-and-replication-setup/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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