pt-table-checksum

16 views
Skip to first unread message

Ishvar B

unread,
Mar 23, 2021, 4:18:29 PM3/23/21
to Percona Discussion

Hi All,

I am new to percona and want to use pt-table-checksum to check differences between my master mysql database and backup mysql database. I want the pt-table-checksum to show errors if there are difference between these two and not to make any other changes. Also, i want to be as minimalistic as possible while my objective is to solely report the difference between the master and the backup.

Also, the backup is in a docker container so doesn’t want to hardcode or make things hairy.

can someone give me the syntax on how to do this? i am looking for instructions on how to give username,password and hostname for both the master and the backup mysql databases.

Thanks
Eswar

Carlos Salguero

unread,
Mar 23, 2021, 5:12:25 PM3/23/21
to Percona Discussion

Ishvar B

unread,
Mar 24, 2021, 7:40:53 AM3/24/21
to percona-d...@googlegroups.com
Hi Carlos,

Thanks. i have already checked them.

My case is a little different. My set up is not master-slave rather onsite running-offsite backup. I take daily backup as dump of the my active database and this is stored on a separate server. Now to make sure that the dump is in sync with the active database, I have to run checksums immeditely after the dump against both these databases and compare and report. 

As the backup is just a dump, I am planning to bring a short lived mysql container, run checksums on this and on the active database and report. 

Does that make sense? Also, can pt-table-checksum work for this kind of scenario?

Thanks
Eswar

--
You received this message because you are subscribed to a topic in the Google Groups "Percona Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/percona-discussion/62Xn6G4tCiQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to percona-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/percona-discussion/c5850977-3595-467e-a8b1-197a76cb53aan%40googlegroups.com.

Justin Swanhart

unread,
Mar 24, 2021, 9:13:18 AM3/24/21
to percona-d...@googlegroups.com
Hi,

If the source database is modified during the backup process, that won't work but if it isn't it will.

Your best bet is not to use a dump but to use xtrabackup.  This will create a backup that is up to date with the end of the backup and you can stream the backup to the remote server.  Then you can start a copy of the backup, set up replication and then run the pt-table-checksum to verify it.

Ideally you would just run that backup all the time after verification and backup that "hot standby" instead of the source.

All of the above is scriptable but if you need assistance, I provide consulting at a very reasonable rate :)

You received this message because you are subscribed to the Google Groups "Percona Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to percona-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/percona-discussion/CAG%3DpFoagZsFCCSjmN_Y6qg2PzMVneCBqUpEygMivXCFWPKmFcg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages