Innobackupex incremental backup not work

Hi
I have a problem on restoring myincremental backup.

I did Following:
First, I make full backup in day one:
innobackupex -user=root -password=123 --no-timestamp mysqlbackup/incremental/base
innobackupex -user=root -password=123 --apply-log --redo-only mysqlbackup/incremental/base

then after some changes in day two I make a incremental in day two:
innobackupex -user=root -password=123 --no-timestamp --incremental mysqlbackup/incremental/inc01 --incremental-basedir=mysqlbackup/incremental/base
innobackupex -user=root -password=123 --apply-log mysqlbackup/incremental/base --incremental-basedir=mysqlbackup/incremental/inc01
innobackupex --apply-log mysqlbackup/incremental/base

And, restored it in day 3:
/etc/init.d/mysqld stop
mv /var/lib/mysql/ /var/lib/mysql-old
innobackupex -user=root -password=123 --copy-back mysqlbackup/incremental/base
chown -R mysql:mysql /var/lib/mysql/
/etc/init.d/mysqld start

But i were wondered when I see, the changes of day two (incremental backup) not applied to backup.
Does anyone know what the problem is?
Thanks in advance
morteza.

Software and versions
CentOS 6.2
Mysql 5.1
xtrabackup : last version from percona repository ,last weak

Hi Morteza,

I have tested locally and it works fine for me. There is only one change in steps. While applying incremental backup to the base backup, you are using this.

innobackupex -user=root -password=123 --apply-log mysqlbackup/incremental/base –incremental-basedir=mysqlbackup/incremental/inc01

and I’m using this.

innobackupex -user=root -password=123 --apply-log –redo-only mysqlbackup/incremental/base –incremental-dir=mysqlbackup/incremental/inc01

Reference: http://www.percona.com/doc/percona-xtrabackup/howtos/recipes _ibkx_inc.html

Can you try again with above step and check? thanks.

Hi niljoshi and thanks for replying.

i applied new changes, but when i run:
innobackupex -user=root -password=123 --apply-log --redo-only mysqlbackup/incremental/base --incremental-dir=mysqlbackup/incremental/inc01
it error!!


the error content is:
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Inc 2009-2012. All Rights Reserved.

This software is published under
the 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!”.

120920 13:22:46 innobackupex: Starting ibbackup with command: xtrabackup_55 --defaults-file="/root/mysqlbackup/incremental/base/backup-my.cnf " --defaults-group=“mysqld” --prepare --target-dir=/root/mysqlbackup/incremental/base --apply-log-only --incremental-dir=mysqlbackup/incremental/inc01

xtrabackup_55 version 2.0.2 for Percona Server 5.5.16 Linux (x86_64) (revision id: 461)
incremental backup from 2725276 is enabled.
xtrabackup: cd to /root/mysqlbackup/incremental/base
xtrabackup: This target seems to be already prepared.
120920 13:22:46 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 mysqlbackup/incremental/inc01/xtrabackup_logfile. will try to find.
120920 13:22:46 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 mysqlbackup/incremental/inc01/xtrabackup_logfile.
xtrabackup: Error: xtrabackup_init_temp_log() failed.
innobackupex: Error:
innobackupex: ibbackup failed at /usr/bin/innobackupex line 374.



the directory of mysqlbackup/incremental/inc01 contains below files:
mysql [dir]
mydb [dir]
backup-my.cnf
ibdata1.delta
ibdata1.meta
xtrabackup_binary
xtrabackup_binlog_info
xtrabackup_checkpoints
xtrabackup_logfile

thanks.
morteza