Not the answer you need?
Register and ask your own question!

Information about xtrabackup with MASTER and SLAVE (--master-data)

KoHeadKoHead ContributorInactive User Role Beginner
Hello all,

I have a question about xtrabackup and restoring of backup on slave.

In production environnement i have a server mysql master and multiple slaves servers.

If i want to restore a backup make with xtrabackup on a slave since the master, i have constrain to do a change master to-> master_user='rep',-> master_password='rep',.. in SQL ?

Typically with mysqldump this option is "--master-data", which automatically appends the CHANGE MASTER TO .

Xtrabackup does not provide a tool for to do that automatically ?

the slave-info option in xtrabackup



  • miguelangelnietomiguelangelnieto Member Inactive User Role Beginner

    Is not possible to automatically run the change master, you have to run it manually after restoring the database.

    If you are taking a backup from the master server and want to create a new slave from it you need to read the xtrabackup_binlog_info info and get the binary log filename and position from it.

    If you are taking a backup from a slave to create another slave you have to run the backup with --slave-info and then after the restore process run the CHANGE MASTER with the information from xtrabackup_slave_info file.

    You have more detailed information here: _up_replication.html

  • KoHeadKoHead Contributor Inactive User Role Beginner

    Thanks for your response.

    It's pity, maybe in a futur realase ? it's a interesting functionnality

    I will to write a script for automatically append the change master.

Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.