# Database backup restoration getting corrupted

**URL:** <https://forums.percona.com/t/database-backup-restoration-getting-corrupted/13593>\
**Category:** Percona Server for MySQL 5.7\
**Tags:** mysql, percona\
**Created:** [December 21, 2021, 12:49pm UTC](https://forums.percona.com/t/database-backup-restoration-getting-corrupted/13593 "2021-12-21T12:49:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul\_Kanaujia](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/rahul_kanaujia/32/5386_2.png) [@Rahul\_Kanaujia](https://forums.percona.com/u/Rahul_Kanaujia)\
**Post date:** [December 21, 2021, 12:49pm UTC](https://forums.percona.com/t/database-backup-restoration-getting-corrupted/13593/1 "2021-12-21T12:49:45Z")

</div>

Hi  
I am using Percona-MySQL 5.7.13 community edition.  
We have taken backup from production server and trying to restore it on one of our broken slave server.

**xtrabackup version is 2.4.4**  
OS: RHEL - 6  
**Backup command** : xtrabackup --backup --user=’USERNAME’ --password=’PASSWORD’ --parallel=10 --compress --compress-threads=10 --no-timestamp --keyring-file-data=/var/lib/mysql-keyring/keyring --target-dir=/backup/

**Preapre command** : xtrabackup --prepare --use-memory=110G --parallel=12 --target-dir=/db/mysql --keyring-file-data=/var/lib/mysql-keyring/keyring

**Note: backup is getting completed successfully.**  
But we are getting below error while performing prepare.

InnoDB: Page [page id: space=6640, page number=0] log sequence number 62770658918254 is in the future! Current system log sequence number 62767623479595.  
InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to [MySQL :: MySQL 5.7 Reference Manual :: 14.22.2 Forcing InnoDB Recovery](http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html) for information about forcing recovery.  
InnoDB: Page [page id: space=5931, page number=0] log sequence number 62771362459789 is in the future! Current system log sequence number 62767623479595.  
InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to [MySQL :: MySQL 5.7 Reference Manual :: 14.22.2 Forcing InnoDB Recovery](http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html) for information about forcing recovery.  
InnoDB: xtrabackup: Last MySQL binlog file position 85519670, file name mysql-bin.007135

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

Please help us as we are not able to perform backup validation and it’s very critical for us.

---

<div class="post-metadata">

**Author:** ![Marcelo\_Altmann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcelo_altmann/32/11299_2.png) [@Marcelo\_Altmann](https://forums.percona.com/u/Marcelo_Altmann)\
**Post date:** [December 21, 2021, 1:04pm UTC](https://forums.percona.com/t/database-backup-restoration-getting-corrupted/13593/2 "2021-12-21T13:04:44Z")

</div>

Hi There,

I would suggest you to try running with latest version of xtrabackup 2.4 (currently on 2.4.24), if the problem persists, please send us the full log from --backup and --prepare phases.

---

<div class="post-metadata">

**Author:** ![Rahul\_Kanaujia](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/rahul_kanaujia/32/5386_2.png) [@Rahul\_Kanaujia](https://forums.percona.com/u/Rahul_Kanaujia)\
**Post date:** [December 22, 2021, 8:00am UTC](https://forums.percona.com/t/database-backup-restoration-getting-corrupted/13593/3 "2021-12-22T08:00:15Z")

</div>

Hi Marcelo\_Altmann,

Thanks a lot for quick response , will try that and share the logs if issue persists.  
Meanwhile i just wanted to know if I have took backup using innobackupex utility in compress format and restoring it using xtrabackup I mean de-compression and prepare, will it fine or I have to compulsory use innobackupex only for decompression and prepare.  
In case if I have to use innobackupex only , could you please help me with command for that.

---

<div class="post-metadata">

**Author:** ![Marcelo\_Altmann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcelo_altmann/32/11299_2.png) [@Marcelo\_Altmann](https://forums.percona.com/u/Marcelo_Altmann)\
**Post date:** [December 22, 2021, 11:21am UTC](https://forums.percona.com/t/database-backup-restoration-getting-corrupted/13593/4 "2021-12-22T11:21:53Z")

</div>

You can use xtrabackup. Innobackupex is just a wrapper that underneath calls xtrabackup to execute the prepare operation.

---

<div class="post-metadata">

**Author:** ![Rahul\_Kanaujia](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/rahul_kanaujia/32/5386_2.png) [@Rahul\_Kanaujia](https://forums.percona.com/u/Rahul_Kanaujia)\
**Post date:** [December 22, 2021, 1:57pm UTC](https://forums.percona.com/t/database-backup-restoration-getting-corrupted/13593/5 "2021-12-22T13:57:09Z")

</div>

Thank you for the information.
