# Create slave form XtraBackup

**URL:** <https://forums.percona.com/t/create-slave-form-xtrabackup/2160>\
**Category:** Percona XtraBackup\
**Created:** [August 1, 2011, 2:05am UTC](https://forums.percona.com/t/create-slave-form-xtrabackup/2160 "2011-08-01T02:05:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nalberti](https://avatars.discourse-cdn.com/v4/letter/n/f1d935/32.png) [@nalberti](https://forums.percona.com/u/nalberti)\
**Post date:** [August 1, 2011, 2:05am UTC](https://forums.percona.com/t/create-slave-form-xtrabackup/2160/1 "2011-08-01T02:05:04Z")

</div>

Hi All,

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;

1. Take my last full, create an incremental with it (or just use last nights copy)
2. Prepare the backup
3. copy across to the slave server
4. Configure the db as a slave, start the db and stop the slave process
5. Set  
MASTER\_LOG\_FILE = ‘xxxx’,  
MASTER\_LOG\_POS = xxxx;
6. Start the slave process
7. 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)

Thanks 🙂

Nathan.

---

<div class="post-metadata">

**Author:** ![revin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/revin/32/824_2.png) [@revin](https://forums.percona.com/u/revin)\
**Post date:** [August 2, 2011, 8:47pm UTC](https://forums.percona.com/t/create-slave-form-xtrabackup/2160/2 "2011-08-02T20:47:33Z")

</div>

Hi,

[http://www.percona.com/docs/wiki/percona-xtrabackup:innoback](http://www.percona.com/docs/wiki/percona-xtrabackup:innoback) upex:how\_to\_recipes

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:

1. Backup and copy to remote (see recipes above)
2. Prepare the backup (see recipes)
3. Start MySQL on slave
4. Configure replication on slave with CHANGE MASTER TO
5. Start slave
6. Monitor replication

---

<div class="post-metadata">

**Author:** ![nalberti](https://avatars.discourse-cdn.com/v4/letter/n/f1d935/32.png) [@nalberti](https://forums.percona.com/u/nalberti)\
**Post date:** [August 8, 2011, 5:26am UTC](https://forums.percona.com/t/create-slave-form-xtrabackup/2160/3 "2011-08-08T05:26:12Z")

</div>

Great, thanks 🙂

Worked fine, with this procedure, slave replication came straight up from last nights backup and all looking good.
