Details
-
Task
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
Description
MariaDB does not provide an easy way to restore a node in multi master
What DBA should do for M1<->M2
echo "STOP SLAVE; set sql_log_bin=0;" ; mysqldump .... ; echo "START SLAVE;" > backup.sql
This situation is not good as by lack of knowledge many users report active master database corruption caused by binlog reexecution of the restore of the peer node
To simplify restoring of a slave MySQL 5.7 introduced
--apply-slave-statements
Include STOP SLAVE prior to CHANGE MASTER statement and START SLAVE at end of output
Not documented and implemented yet in MariaDB
We could implement a --multi-master that is combination of --apply-slave-statements
and --skip-binlog disable binlog on restore .
--skip-binlog is still at this time a long awaited option requested 10 years ago
Extra workload protection :
At the time of dump we could get a way to store the replication slave server_id in the dump , restoring the dump can check that current server id is the same as in the dump and break the restore by introducing an SQL error :ERR xxx - "the restore will be replay on the master it is originated" : please use --force to ignore this error
Attachments
Issue Links
- relates to
-
MDEV-37135 Data Loss if a Primary is Reverted And Made a Slave
-
- Open
-