Help Center/ Data Replication Service/ FAQs/ General Operations/ Will Data of DRS Tasks Be Lost After a Primary/Standby Switchover Occurs on the Source MySQL Database?
Updated on 2022-12-30 GMT+08:00

Will Data of DRS Tasks Be Lost After a Primary/Standby Switchover Occurs on the Source MySQL Database?

If GTID is enabled for the source MySQL database, DRS records the binlog position information when a primary/standby switchover occurs. After the primary/standby switchover, DRS resumes data transfer from the last interrupted position to prevent data loss.

You can modify the database configuration file to enable GTID for the source MySQL database. The modification takes effect after the database is restarted.

The reference commands are as follows:

gtid_mode = on
log_slave_updates = true
enforce_gtid_consistency = on