mydumper

The binary log information is available in the metadata:

shell> sudo cat /backups/metadata Started dump at: 2017-08-26 06:26:19SHOW MASTER STATUS: Log: server1.000012 Pos: 154</span> GTID:SHOW SLAVE STATUS: Host: 35.186.158.188 Log: centos7-bin.000001 Pos: 463 GTID:Finished dump at: 2017-08-26 06:26:24 

If you have taken the binary log backup from the slave, you should start the restore from the server1.000012 file at position 154 (SHOW MASTER STATUS):

shell> mysqlbinlog --start-position=154  --disable-log-bin /backups/binlogs/server1.000012 | mysql -u<user> -p -h <host> -f

If you have a binary log backup from the master, you should start the restore from centos7-bin.000001 at position 463 (SHOW SLAVE STATUS):

shell> mysqlbinlog --start-position=463 ...

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.