Mysql Master Slave Replication on a large database table (how to sync raw data)
We have a production server and a dev server. We have found that backups are nearly impossible on a production server due to the volume of requests we experience. So we're looking at setting up replication with our dev server slave. This is ideal because we can afford to lock tables on this server and besides, it would be nice to have up-to-date data for developers. Now the problems. At this point, the production server cannot be taken down or locked out, at least not easy. We have a high volume of queries and fairly large 30-inch innodb tables. Both servers run all innodb and are also on mysql 5.1. What can we do to get the data in sync first to start replication? I've tried several options but none have worked so far.
a source to share
Your question seems to indicate that you have one production server with no redundancy and no plans to troubleshoot the main database server. If this assumption is correct, then there are two ways to configure replication.
-
Continue on to configure replication using the architecture as is. If you choose this path, you will need more information to find out which approach is best for you. For example, are binary logs included? Without going into details, I think the best advice I can give is to look into the Percona XtraBackup tool.
-
The second option is to update your production database architecture, including redundancy and a workable failure plan. This will give you a more reliable environment and the ability to easily set up additional replication. I would highly recommend this option as you will end up with a problem with the production database server, resulting in an unplanned outage.
a source to share