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?

2
  • Go to dba.stackoverflow.com for more discussion of this.
    – Rick James
    Sep 19, 2020 at 23:32
  • Thanks I wasn't aware of this site. ;)
    – meme
    Sep 20, 2020 at 6:34

1 Answer 1

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.

2
  • Be sure to test this before relying on it. (I think there are some details missing.)
    – Rick James
    Sep 19, 2020 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, 2020 at 6:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .