12. 補足:Backup & Replication (MySQL)
-bash-4.2$ zcat ALLDB_20200105.sql.gz | grep -A5 "Position to start replication or point-in-time recovery from"
-- Position to start replication or point-in-time recovery from
--
-- CHANGE MASTER TO MASTER_LOG_FILE='binlog.001403', MASTER_LOG_POS=155;
--
-bash-4.2$ cat dbs_20200105.sql | grep -A5 "GTID state at the beginning of the backup"
-- GTID state at the beginning of the backup
--
SET @@GLOBAL.GTID_PURGED=/*!80000 '+'*/ '50fca08e-5a35-11e8-a4f2-06db798d79c8:1';
--
Logポジションベースのレプリケーションはここから
レプリケーション開始すればOK
GTIDベースのレプリケーションはここから
レプリケーション開始されるのでリストア後にAUTO
でこのポジションから同期が開始される。