# Restoring FULL backup and 5 days INCR backups ..... then what ?

**URL:** <https://forums.percona.com/t/restoring-full-backup-and-5-days-incr-backups-then-what/5651>\
**Category:** Percona XtraBackup\
**Created:** [May 31, 2017, 6:06pm UTC](https://forums.percona.com/t/restoring-full-backup-and-5-days-incr-backups-then-what/5651 "2017-05-31T18:06:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mysql.girl](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mysql.girl/32/29_2.png) [@mysql.girl](https://forums.percona.com/u/mysql.girl)\
**Post date:** [May 31, 2017, 6:06pm UTC](https://forums.percona.com/t/restoring-full-backup-and-5-days-incr-backups-then-what/5651/1 "2017-05-31T18:06:15Z")

</div>

I have restored a FULL backup and 5 INCR backups  
I am now trying to find out what is the next binlog file I need to apply to roll forward and what possition to start the roll forward from …  
It appears to me the two files in datadir named xtraback are not updateid with the INCR apply info?  
IS that correct ?

I can I trust the info in this two files after I have applied INCR backups?  
-rw-r----- 1 mysql mysql 91 May 30 19:17 xtrabackup\_slave\_info  
-rw-r----- 1 mysql mysql 546 May 30 19:17 xtrabackup\_info

Is this info valid to use for my next step ie apply more binlogs via mysqlbinlog tool…

Where do I get the POS and LOG\_FILE information to use for my mysqlbinlog tool ?

more xtrabackup\_slave\_info  
CHANGE MASTER TO MASTER\_LOG\_FILE=‘db-001-bin.001166’, MASTER\_LOG\_POS=376851998

show slave status \G  
Master\_Log\_File: db-001-finance-bf1-bin.001166  
Read\_Master\_Log\_Pos: 376851998

List the same info as found in the xtrabackup\_info files

mysqlbinlog --start-position=376851998 db-001-bf1-bin.001166 | mysql -u xxxxx -pxxxxx  
ERROR 1062 (23000) at line 43082: Duplicate entry ‘xxxxxxxxxxxxxl’ for key ‘PRIMARY’

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [June 14, 2017, 9:57am UTC](https://forums.percona.com/t/restoring-full-backup-and-5-days-incr-backups-then-what/5651/2 "2017-06-14T09:57:23Z")

</div>

Hello mysql.girl,  
From the information provided, it appears you backed up a slave and are attempting to restore that backup to that same machine. xtrabackup\_slave\_info will contain the CHANGE MASTER statement necessary to restore replication to the original master at the time the last incremental backup was taken. You should not need to replay any binary logs provided that the master has not rotated out or removed the requested binary log. In your example, if the master still has ‘db-001-bin.001166’ available, this is all you need to do. You can check by going to the master and running “SHOW BINARY LOGS”. If the log is no longer present, then you will have do some replay. But you will still need the original logs from the master.

I’m a little confused by your post. The CHANGE MASTER from the backup says ‘db-001-bin.001166’ but your SHOW SLAVE STATUS says ‘db-001-finance-bf1-bin.001166’. This indicates two different masters (because of different binary log names).

Could you explain a bit more your topology by providing hostnames?
