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

  • Filter
  • Time
  • Show
Clear All
new posts

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

    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


  • #2

    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:

    http://www.percona.com/doc/percona-xtrabackup/howtos/setting _up_replication.html



    • #3

      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.