Buy Percona ServicesBuy Now!

Restoring master from slave

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Restoring master from slave

    Hi.
    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/quest...m-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 -
    1. Stop slave on Server B
    2. Use xtrabackup to clone data from Server B to C.
    3. Change master on server B to point to the current binlog file and position of server C.
    4. 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


Working...
X