MySQL Fast Database Data Validation Master/Slave


I'm moving a MySQL database from the US to Australia and have a requirement where downtime is kept to an absolute minimum.

The database is 400GB is size, replication is working without any issues. However, performing data validation takes days with pt-table-checksum.

To ensure that the database integrity is maintained up until the point of cutting over, is there a better tool than pt-table-checksum to validate the data is consistent between the master and slave? Or can pt-table-checksum be optimised to run faster?

Please note that initial testing with pt-table-checksum across the different geographic regions was performed where the databases were both idle

Any advice is appreciated!

Best Answer

The Master is now in the US? But will later be in Australia?

Rather than simply have Master (in US) + Slave, also set up the binlog (etc) so that it is Master-Master. However, continue to write only to the US Master.

Once you have spent days on validation, you should be ready to point the clients at the Australia Master. At this point, you have to trust that the days of replication makes across the big pond correctly. (You could spend more days re-validating, but I expect it will say OK.)

I don't know for a fact, but I would expect pt-table-checksum to work almost as fast in a live system as an idle one.