2

I've got a master/slave mariadb setup using gtid. As far as I've read I should prefer using the slave side for backups. But what's in case of a desaster? Can I restore the slave in the new master? And what's the way to restore it properly? Do I have to reset the GTIDs and start from current?

meme
  • 43
  • 4

1 Answers1

1

In case of a complete disaster (loss of both servers), you restore the backup to a new master and the new slave, and use CHANGE MASTER to get it replicating.

If you only lose the master, you switch to the slave and make it the new master, and rebuild the failed server as the new slave.

Gordan Bobić
  • 971
  • 4
  • 11
  • Be sure to test this _before_ relying on it. (I think there are some details missing.) – Rick James Sep 19 '20 at 23:32
  • As far as I can see it looks okay when restoring in both cases. After switching the old slave to master or install the cluster. I've got to provide the gtid in the change master command to get the slave running properly (means it get his data from master): – meme Sep 20 '20 at 06:48