the first step is to checksum difference and record into percona.checksum table
pt-table-checksum h=xx,P=xx,u=xx,p=xx method=dsn=h=xx,D=xx,t=xx --databases=kobe
the second step is to print the repair SQL into a file
pt-table-sync --print --sync-to-master h=xx,P=xx,u=xx,p=xx >repair.sql
and I need to take this repairsql file to developers,show them how many records are difference, difference detail, and let them make sure。Ater that
I execute the repair sql
so my question is what I execute this old repair SQL, the new data is inserting ,and the new difference is creating, maybe this old repair SQL will cover the latest data !
can anybody help me ? thank you !
Best Answer
Use the
--where
optionSource: https://www.percona.com/doc/percona-toolkit/2.2/pt-table-checksum.html#cmdoption-pt-table-checksum--where