# \--copy-back does not copy back ib\_logfiles

**URL:** <https://forums.percona.com/t/copy-back-does-not-copy-back-ib-logfiles/2275>\
**Category:** Percona XtraBackup\
**Created:** [August 3, 2012, 8:39am UTC](https://forums.percona.com/t/copy-back-does-not-copy-back-ib-logfiles/2275 "2012-08-03T08:39:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gilmcgrath](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@gilmcgrath](https://forums.percona.com/u/gilmcgrath)\
**Post date:** [August 3, 2012, 8:39am UTC](https://forums.percona.com/t/copy-back-does-not-copy-back-ib-logfiles/2275/1 "2012-08-03T08:39:19Z")

</div>

I have prepared a backup and on --copy-back it copies back everything except the ib\_logfile0 and ib\_logfile1

Has anyone experienced this?

The output of the --copy-back says it copied them back…

innobackupex: Starting to copy InnoDB log files  
innobackupex: in ‘/nfsvol5/largesingle5/mysqlbackup/percona-full\_2012-08-01\_2 1-00-01/db\_backup’  
innobackupex: back to original InnoDB log directory ‘/nfsvol1/largesingle5/mysql/data’  
innobackupex: Finished copying back files.

120803 09:55:35 innobackupex: completed OK!

---

<div class="post-metadata">

**Author:** ![SQLGuy](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@SQLGuy](https://forums.percona.com/u/SQLGuy)\
**Post date:** [August 3, 2012, 11:26am UTC](https://forums.percona.com/t/copy-back-does-not-copy-back-ib-logfiles/2275/2 "2012-08-03T11:26:51Z")

</div>

Those are the InnoDB redo logs, they are created by the MySQL server when MySQL starts back up so there’s no need to copy them back. At least that was the observation I had when I did a restore. See the entry below from the error log when our instance of MySQL was started up after a “copy-back” Percona restore (we set the file size to 64 MB in our my.cnf file):

120727 16:46:31 InnoDB: Log file /mysql/logs/logs/ib\_logfile0 did not exist: new to be created  
InnoDB: Setting log file /mysql/logs/logs/ib\_logfile0 size to 64 MB  
InnoDB: Database physically writes the file full: wait…  
120727 16:46:31 InnoDB: Log file /mysql/logs/logs/ib\_logfile1 did not exist: new to be created  
InnoDB: Setting log file /mysql/logs/logs/ib\_logfile1 size to 64 MB  
InnoDB: Database physically writes the file full: wait…

---

<div class="post-metadata">

**Author:** ![gilmcgrath](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@gilmcgrath](https://forums.percona.com/u/gilmcgrath)\
**Post date:** [August 3, 2012, 3:01pm UTC](https://forums.percona.com/t/copy-back-does-not-copy-back-ib-logfiles/2275/3 "2012-08-03T15:01:29Z")

</div>

OK - you are correct - I get the same behavoir.

Then why does the output say it is coping the log log files when it does not need them? I am not a DB nor a mysql expert - so this seems misleading.

I assume after the DB is started I can go ahead and apply binary log to get an to date DB.
