MySQL Database Migration using Rsync
Hello,
I am planing to migrate a MySQL database using rsync utility. MySQL database runs in a red hat cluster and added to the high availability service. I just want to perform a test Migration when the database and application services are online. I am going to rsync the mysql data directory to a different machine when the application and database is online. Will this cause any issue to the database like file corruption or file inconsistency? I am worried about my production database state during this activity. Please assist me if anyone have came across this situation.
Will it cause any file lock if I copy the mysql data directory during peak business hours?
Regards,
Naresh
-
Official comment
Hi,
Rsync will not impact consistency of your files on the source server. It won't maintain data consistency on the target server, though, unless you stop the source database first. Such test may be useful to test how long will take to copy the data but that's about it.
It should not lock any of your data on the source host, you have to keep in mind though, it's always some additional load and your system may be eventually impacted. This is unavoidable as you use I/O (to read the data), network (to transfer the data) and CPU (to manage whole process) while doing any kind of backup, rsync included.
Thanks,
Krzysztof
Comment actions
Please sign in to leave a comment.
Comments
1 comment