Once the full backup is restored, you need to restore binary logs to get point-in-time recovery. The backups provide the binary log coordinates up to which the backups are available.
As explained in Chapter 7, Backups, in the Locking instance for backup section, you should choose the binary log backup from the right server, based on the --dump-slave
or --master-data
option specified in mysqldump
.
Let's get into the details of doing it. There's a lot to learn here though.
The binary log information is stored in the SQL file as the CHANGE MASTER TO
command based on the options you passed to mysqldump
/mysqlpump
.
- If you have used
--master-data
, you should use the binary logs of the slave:
shell> head -30 /backups/dump.sql -- MySQL dump 10.13Distrib 8.0.3-rc, for Linux (x86_64) -- -- Host: localhostDatabase: -- ------------------------------------------------------ -- Server version8.0.3-rc-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT...