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 ?
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.