This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-16. For the latest, interactive version please visit https://mariadb.com/kb/.

MariaDB restore from binary log and relay log on master master setup

Hi Guys,

i have setup a mariadb master master setup and i am testing recovery.

i have a question if both servers are down and i have last good full backup and the binary log and relay log how do i recover. till now i can play the binary log and the changes take place but when i play the relay log it does not add the changes:

[root@db1 mysql]# mysqlbinlog mariadb-bin.000014 | mysql -u root -p

mysqlbinlog --start-position=485214 --stop-position=485594 relay-bin.000002 | mysql -u root -p

MariaDB [test]> select * from test1; +----+-------+---------------------+

idnamedatum

+----+-------+---------------------+

1test12019-09-25 13:06:36
2test22019-09-25 13:06:58
3test32019-09-25 13:07:04
5test32019-09-25 13:16:45

+----+-------+---------------------+ 4 rows in set (0.000 sec)

MariaDB [test]>

the third row should not be there as from the relay log it has been deleted.

Please help i am stuck :(

Tim

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.