Cannot apply logs of incremental backup

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

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).

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