# INcremental backup Error--------------------------

**URL:** https://forums.percona.com/t/incremental-backup-error/4971
**Category:** Percona XtraBackup
**Created:** [July 14, 2016, 11:09pm UTC](https://forums.percona.com/t/incremental-backup-error/4971 "2016-07-14T23:09:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pranit](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@pranit](https://forums.percona.com/u/pranit)
#### Post date: [July 14, 2016, 11:09pm UTC](https://forums.percona.com/t/incremental-backup-error/4971/1 "2016-07-14T23:09:42Z")

</div>

Hello Guy’s

Here I am try to make incremental backup.

But its giving error as

xtrabackup: error: The transaction log file is corrupted.  
xtrabackup: error: The log was not applied to the intended LSN!  
xtrabackup: Log applied to lsn 259598256369  
xtrabackup: The intended lsn is 259602830142

Here I have take two incremental backup and append it on full backup but when prepare the full backup the above error occured…

Please suggest on same.  
---------------------------------------------------------Creating the full backup-----------------------------------------------------------

innobackupex --socket=/else/datastore\_1/mysql.sock --user=\*\*\*\*\* --password=\*\*\*\*\*\* --parallel=14 /else/percon-rnd/

backup\_type = full-backuped  
from\_lsn = 0  
to\_lsn = 259598255342  
last\_lsn = 259598255351  
compact = 0  
recover\_binlog\_info = 0

---------------------------------------------------------PREPARE FULL BACKUP-----------------------------------------------------------------

innobackupex --user=\*\*\*\*\* --password=\*\*\*\*\*\* --apply-log /else/percon-rnd/2016-07-14\_19-00-23/

drwxr-x— 2 root root 12288 Jul 14 19:17 cacti  
drwxr-x— 2 root root 4096 Jul 14 19:17 employees  
-rw-r----- 1 root root 6836 Jul 14 19:17 ib\_buffer\_pool  
-rw-r----- 1 root root 3032481792 Jul 14 19:16 ibdata1  
-rw-r----- 1 root root 50331648 Jul 14 19:15 ib\_logfile0  
-rw-r----- 1 root root 50331648 Jul 14 19:15 ib\_logfile1  
-rw-r----- 1 root root 12582912 Jul 14 19:17 ibtmp1  
drwxr-x— 2 root root 4096 Jul 14 19:28 innodb\_memcache  
drwxr-x— 2 root root 4096 Jul 14 19:16 mysql  
drwxr-x— 2 root root 16384 Jul 14 19:27 OmNet  
drwxr-x— 2 root root 4096 Jul 14 19:17 performance\_schema  
drwxr-x— 2 root root 12288 Jul 14 19:17 sys  
drwxr-x— 2 root root 4096 Jul 14 19:17 test  
-rw-r----- 1 root root 548 Jul 14 19:17 xtrabackup\_info

chown -cR mysql.mysql /datastore\_2/

/etc/init.d/mysql\_2 start

Starting MySQL…[OK]

after login

make some changes on database OmNet

Then take 1st Incremental

-------------------------------------------------------Creating the first incremental backup:-----------------------------------------------

innobackupex --socket=/else/datastore\_2/mysql.sock --user=\*\*\*\*\* --password=\*\*\*\*\*\* --incremental --incremental-basedir=/else/percon-rnd/2016-07-14\_19-00-23/

–parallel=18 /else/percon-rnd/INC1/

backup\_type = incremental  
from\_lsn = 259598255342  
to\_lsn = 259602825467  
last\_lsn = 259602825476  
compact = 0  
recover\_binlog\_info = 0

again login mysql make chagnes in Omnet database

-------------------------------------------------------Creating second Incremental backup:-----------------------------------------------------------

innobackupex --socket=/else/datastore\_2/mysql.sock --user=\*\*\*\*\* --password=\*\*\*\*\*\* --incremental --incremental-basedir=/else/percon-rnd/INC1/2016-07-14\_19-

31-37/ --parallel=18 /else/percon-rnd/INC2/

backup\_type = incremental  
from\_lsn = 259602825467  
to\_lsn = 259602830142  
last\_lsn = 259602830151  
compact = 0  
recover\_binlog\_info = 0

* * *

du -shc /else/percon-rnd/\*

26G /else/percon-rnd/2016-07-14\_19-00-23  
13M /else/percon-rnd/INC1  
11M /else/percon-rnd/INC2  
26G total

-----------------------------------------------------PREPARE BASE BACKUP--------------------------------------------------------------------------------

the procedure is very straight-forward using the --redo-only option, starting with the base backup:

innobackupex --apply-log --redo-only /else/percon-rnd/2016-07-14\_19-00-23/

backup\_type = log-applied  
from\_lsn = 0  
to\_lsn = 259598255342  
last\_lsn = 259598255351  
compact = 0  
recover\_binlog\_info = 0

----------------------------------------------------PREPARE INCREMENTAL BACKUP--------------------------------------------------------------------------

Replay the committed transactions on the base backup (by adding the option “–redo-only”):

innobackupex --user=\*\*\*\*\* --password=\*\*\*\*\* --socket=/else/datastore\_2/mysql.sock --apply-log --redo-only /else/percon-rnd/2016-07-14\_19-00-23/ –

incremental-dir=/else/percon-rnd/INC1/2016-07-14\_19-31-37/

innobackupex --user=\*\*\*\*\* --password=\*\*\*\*\*\* --socket=/else/datastore\_2/mysql.sock --apply-log-only /else/percon-rnd/INC1/2016-07-14\_19-31-37/ –

incremental-dir=/else/percon-rnd/INC2/2016-07-14\_19-36-51/

-------------------------------------------------PREPARE FULL BACKUP---------------------------------------------------------------------------------

innobackupex --apply-log /else/percon-rnd/2016-07-14\_19-00-23/

----------------------------------------------------------ITS GIVE ERROR-----------------------------------------------------------------

MPORTANT: Please check that the apply-log run completes successfully.  
At the end of a successful apply-log run innobackupex  
prints “completed OK!”.

innobackupex version 2.4.2 based on MySQL server 5.7.11 Linux (x86\_64) (revision id: 8e86a84)  
xtrabackup: cd to /else/percon-rnd/2016-07-14\_19-00-23  
xtrabackup: This target seems to be already prepared with --apply-log-only.  
InnoDB: Number of pools: 1  
xtrabackup: notice: xtrabackup\_logfile was already used to ‘–prepare’.  
xtrabackup: using the following InnoDB configuration for recovery:  
xtrabackup: innodb\_data\_home\_dir = .  
xtrabackup: innodb\_data\_file\_path = ibdata1:12M:autoextend  
xtrabackup: innodb\_log\_group\_home\_dir = .  
xtrabackup: innodb\_log\_files\_in\_group = 2  
xtrabackup: innodb\_log\_file\_size = 50331648  
xtrabackup: using the following InnoDB configuration for recovery:  
xtrabackup: innodb\_data\_home\_dir = .  
xtrabackup: innodb\_data\_file\_path = ibdata1:12M:autoextend  
xtrabackup: innodb\_log\_group\_home\_dir = .  
xtrabackup: innodb\_log\_files\_in\_group = 2  
xtrabackup: innodb\_log\_file\_size = 50331648  
xtrabackup: Starting InnoDB instance for recovery.  
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)  
InnoDB: PUNCH HOLE support available  
InnoDB: Mutexes and rw\_locks use GCC atomic builtins  
InnoDB: Uses event mutexes  
InnoDB: GCC builtin \_\_sync\_synchronize() is used for memory barrier  
InnoDB: Compressed tables use zlib 1.2.3  
InnoDB: Number of pools: 1  
InnoDB: Using CPU crc32 instructions  
InnoDB: Initializing buffer pool, total size = 100M, instances = 1, chunk size = 100M  
InnoDB: Completed initialization of buffer pool  
InnoDB: page\_cleaner coordinator priority: -20  
InnoDB: Highest supported file format is Barracuda.  
InnoDB: Log scan progressed past the checkpoint lsn 259598256350  
InnoDB: Doing recovery: scanned up to log sequence number 259598256369 (0%)  
InnoDB: Doing recovery: scanned up to log sequence number 259598256369 (0%)  
InnoDB: Are you sure you are using the right ib\_logfiles to start up the database? Log sequence number in the ib\_logfiles is 259598256350, less than the log sequence number in the first system tablespace file header, 259602830160.  
InnoDB: Database was not shutdown normally!  
InnoDB: Starting crash recovery.  
InnoDB: Page [page id: space=0, page number=11] log sequence number 259602825253 is in the future! Current system log sequence number 259598256378.

InnoDB: Page [page id: space=0, page number=163861] log sequence number 259598265152 is in the future! Current system log sequence number 259598256378.  
InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to [url][http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html[/url]](http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html%5B/url%5D) for information about forcing recovery.  
InnoDB: Page [page id: space=0, page number=207] log sequence number 259602824985 is in the future! Current system log sequence number 259598256378.  
InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to [url][http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html[/url]](http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html%5B/url%5D) for information about forcing recovery.  
InnoDB: Page [page id: space=0, page number=163851] log sequence number 259602824985 is in the future! Current system log sequence number 259598256378.  
InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to [url][http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html[/url]](http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html%5B/url%5D) for information about forcing recovery.  
InnoDB: Page [page id: space=0, page number=208] log sequence number 259598269415 is in the future! Current system log sequence number 259598256378.  
InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to

xtrabackup: error: The transaction log file is corrupted.  
xtrabackup: error: The log was not applied to the intended LSN!  
xtrabackup: Log applied to lsn 259598256369  
xtrabackup: The intended lsn is 259602830142  
[root@mellanoxapp 2016-07-14\_19-00-23]#
