O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required