I’m in the process of setting up a disaster recovery procedure and I want to verify the process.
I’ve read https://www.percona.com/forums/questions-discussions/percona-xtrabackup/42885-restore-master-from-slave-backup
which contains some very useful information but since promoting the current Slave is not an option I’ll want to clone the slave to a new server and promote it to be the master. The existing slave should be changed to replicate data from the new master.
Here is how my setup should look like -
Server A - Master
Server B - Slave of Server A
Server C - empty
If server A crash and burnes. Since it is completely offline the current state of Server B is the latest state.
recovery steps are -
- Stop slave on Server B
- Use xtrabackup to clone data from Server B to C.
- Change master on server B to point to the current binlog file and position of server C.
- Start Slave on Server B
So After Restore -
Server A - Decommissioned
Server B - Slave of Server C
Server C - Master
Does this process makes sense ?
Is there any step I’m missing when getting the backup from the slave or changing the master?
- I do scheduled backups of the master data and binlog to allow point in time restore, but in case of a real disaster I assume the slave will hold the most up to date data