I’m just trying to get the procedure straight for creating a slave replica of my primary database.
I currently have a single Percona Server with XtraBackup running daily.
Should I be able to;
- Take my last full, create an incremental with it (or just use last nights copy)
- Prepare the backup
- copy across to the slave server
- Configure the db as a slave, start the db and stop the slave process
MASTER_LOG_FILE = ‘xxxx’,
MASTER_LOG_POS = xxxx;
- Start the slave process
- Check slave replication status
Does that seem sane ?
Anything I am missing or should be aware of ?
Is this documented anywhere that I can follow (a search did not return anything useful)
There are a couple of examples where you can combine #1 and #3 from your procedures. After the backup, you can do the prepare from the slave.
I presume by #4 you mean to configure replication from the my.cnf file? I’d suggest doing this with CHANGE MASTER TO from the mysql console to prevent conflicts/confusion with the configuration.
In short you will be doing:
- Backup and copy to remote (see recipes above)
- Prepare the backup (see recipes)
- Start MySQL on slave
- Configure replication on slave with CHANGE MASTER TO
- Start slave
- Monitor replication
Worked fine, with this procedure, slave replication came straight up from last nights backup and all looking good.