Not the answer you need?
Register and ask your own question!

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

mysql.girlmysql.girl ContributorCurrent User Role Contributor
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'

Comments

  • matthewbmatthewb Senior [email protected] Percona Staff Role
    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?
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.