# Cannot apply logs of incremental backup

**URL:** <https://forums.percona.com/t/cannot-apply-logs-of-incremental-backup/2353>\
**Category:** Percona XtraBackup\
**Created:** [March 26, 2013, 9:22am UTC](https://forums.percona.com/t/cannot-apply-logs-of-incremental-backup/2353 "2013-03-26T09:22:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yurmix](https://avatars.discourse-cdn.com/v4/letter/y/b5a626/32.png) [@yurmix](https://forums.percona.com/u/yurmix)\
**Post date:** [March 26, 2013, 9:22am UTC](https://forums.percona.com/t/cannot-apply-logs-of-incremental-backup/2353/1 "2013-03-26T09:22:54Z")

</div>

Hi,

HELP!

I probably missing something here. Otherwise it’s a bug.

I have created a full backup and an incremental backup,  
then tried to apply the logs.

I could apply the logs on the full backup, but couldn’t apply the incremental on top of it.

Get an error:

xtrabackup: Warning: cannot open 2013-03-26\_07-48-06/xtrabackup\_logfile. will try to find.130326 8:26:45 InnoDB: Operating system error number 2 in a file operation.

Here’s the full log:

[root@db01 backup\_xb]# innobackupex --apply-log --redo-only 2013-03-26\_09-33-11InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oyand Percona Ireland Ltd 2009-2012. All Rights Reserved.This software is published underthe GNU GENERAL PUBLIC LICENSE Version 2, June 1991.IMPORTANT: Please check that the apply-log run completes successfully. At the end of a successful apply-log run innobackupex prints “completed OK!”.130326 09:49:57 innobackupex: Starting ibbackup with command: xtrabackup\_55 --defaults-file=“/backup\_xb/2013-03-26\_09-33-11/backup-my.cnf” --defaults-group=“mysqld” --prepare --target-dir=/backup\_xb/2013-03-26\_09-33-11 --apply-log-only --tmpdir=/tmpxtrabackup\_55 version 2.0.6 for Percona Server 5.5.16 Linux (x86\_64) (revision id: 521)xtrabackup: cd to /backup\_xb/2013-03-26\_09-33-11xtrabackup: This target seems to be not prepared yet.xtrabackup: xtrabackup\_logfile detected: size=2097152, start\_lsn=(18402130811)xtrabackup: Temporary instance for recovery is set as followings.xtrabackup: innodb\_data\_home\_dir = ./xtrabackup: innodb\_data\_file\_path = ibdata1:10M:autoextendxtrabackup: innodb\_log\_group\_home\_dir = ./xtrabackup: innodb\_log\_files\_in\_group = 1xtrabackup: innodb\_log\_file\_size = 2097152xtrabackup: Temporary instance for recovery is set as followings.xtrabackup: innodb\_data\_home\_dir = ./xtrabackup: innodb\_data\_file\_path = ibdata1:10M:autoextendxtrabackup: innodb\_log\_group\_home\_dir = ./xtrabackup: innodb\_log\_files\_in\_group = 1xtrabackup: innodb\_log\_file\_size = 2097152xtrabackup: Starting InnoDB instance for recovery.xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)130326 9:49:57 InnoDB: The InnoDB memory heap is disabled130326 9:49:57 InnoDB: Mutexes and rw\_locks use GCC atomic builtins130326 9:49:57 InnoDB: Compressed tables use zlib 1.2.3130326 9:49:57 InnoDB: Initializing buffer pool, size = 100.0M130326 9:49:57 InnoDB: Completed initialization of buffer pool130326 9:49:57 InnoDB: highest supported file format is Barracuda.InnoDB: The log sequence number in ibdata files does not matchInnoDB: the log sequence number in the ib\_logfiles!130326 9:49:57 InnoDB: Database was not shut down normally!InnoDB: Starting crash recovery.InnoDB: Reading tablespace information from the .ibd files…[notice (again)] If you use binary log and don’t use any hack of group commit, the binary log position seems to be:xtrabackup: starting shutdown with innodb\_fast\_shutdown = 1130326 9:49:57 InnoDB: Starting shutdown…130326 9:49:57 InnoDB: Shutdown completed; log sequence number 18402132059130326 09:49:57 innobackupex: completed OK![root@db01 backup\_xb]# innobackupex --apply-log --redo-only 2013-03-26\_09-33-11 --incremental-dir=2013-03-26\_09-34-41InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oyand Percona Ireland Ltd 2009-2012. All Rights Reserved.This software is published underthe GNU GENERAL PUBLIC LICENSE Version 2, June 1991.IMPORTANT: Please check that the apply-log run completes successfully. At the end of a successful apply-log run innobackupex prints “completed OK!”.130326 09:50:29 innobackupex: Starting ibbackup with command: xtrabackup\_55 --defaults-file=“/backup\_xb/2013-03-26\_09-33-11/backup-my.cnf” --defaults-group=“mysqld” --prepare --target-dir=/backup\_xb/2013-03-26\_09-33-11 --apply-log-only --incremental-dir=2013-03-26\_09-34-41 --tmpdir=/tmpxtrabackup\_55 version 2.0.6 for Percona Server 5.5.16 Linux (x86\_64) (revision id: 521)incremental backup from 18402130811 is enabled.xtrabackup: cd to /backup\_xb/2013-03-26\_09-33-11xtrabackup: This target seems to be already prepared.130326 9:50:29 InnoDB: Operating system error number 2 in a file operation.InnoDB: The error means the system cannot find the path specified.xtrabackup: Warning: cannot open 2013-03-26\_09-34-41/xtrabackup\_logfile. will try to find.130326 9:50:29 InnoDB: Operating system error number 2 in a file operation.InnoDB: The error means the system cannot find the path specified. xtrabackup: Fatal error: cannot find 2013-03-26\_09-34-41/xtrabackup\_logfile.xtrabackup: Error: xtrabackup\_init\_temp\_log() failed.innobackupex: Error: innobackupex: ibbackup failed at /usr/bin/innobackupex line 381.

It probably isn’t a permissions issue since I’m running as root.

The file isn’t missing - I can find it with ls:

[root@db01 backup\_xb]# ls -l 2013-03-26\_09-34-41/xtrabackup\_logfile-rw-r----- 1 root root 2560 Mar 26 09:39 2013-03-26\_09-34-41/xtrabackup\_logfile

---

<div class="post-metadata">

**Author:** ![yurmix](https://avatars.discourse-cdn.com/v4/letter/y/b5a626/32.png) [@yurmix](https://forums.percona.com/u/yurmix)\
**Post date:** [March 26, 2013, 9:44am UTC](https://forums.percona.com/t/cannot-apply-logs-of-incremental-backup/2353/2 "2013-03-26T09:44:06Z")

</div>

Found the problem (After heavily digging in Google Search :).

I need to provide a full path for the --incremental-dir .

A bug, I believe (At least a documentation bug).

---

<div class="post-metadata">

**Author:** ![garethdanielsmith](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@garethdanielsmith](https://forums.percona.com/u/garethdanielsmith)\
**Post date:** [June 6, 2014, 4:56am UTC](https://forums.percona.com/t/cannot-apply-logs-of-incremental-backup/2353/3 "2014-06-06T04:56:49Z")

</div>

I just had the same problem, and it had the same solution, thanks yurmix.
