# Xtrabackup: Database page corruption detected at page

**URL:** <https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343>\
**Category:** Percona XtraBackup\
**Tags:** percona\
**Created:** [July 4, 2023, 9:48am UTC](https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343 "2023-07-04T09:48:43Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![jegana](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jegana](https://forums.percona.com/u/jegana)\
**Post date:** [July 4, 2023, 9:48am UTC](https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343/1 "2023-07-04T09:48:43Z")

</div>

Hello Team,  
What is the fix for already reported [issue](https://forums.percona.com/t/backup-is-aborting-with-corrupt-page-in-innodb-system-tablespace/4696). I am also facing the issue no luck after performed innochecksum to fix the corrupted file. I am getting same error when tried the same thing in different servers in my infra. I don’t think so the issue related to table corruption. Can someone pls help me on this.

```auto
230704 09:24:56 [01] Copying ./ibdata1 to /var/tmp/backupxtra/ibdata1

[01] xtrabackup: Database page corruption detected at page 192, retrying...

[01] xtrabackup: Database page corruption detected at page 192, retrying...

[01] xtrabackup: Database page corruption detected at page 192, retrying...

[01] xtrabackup: Database page corruption detected at page 192, retrying...

230704 09:24:57 >> log scanned up to (24491496343)

[01] xtrabackup: Database page corruption detected at page 192, retrying...

[01] xtrabackup: Database page corruption detected at page 192, retrying...

[01] xtrabackup: Database page corruption detected at page 192, retrying...

[01] xtrabackup: Database page corruption detected at page 192, retrying...

[01] xtrabackup: Database page corruption detected at page 192, retrying...

[01] xtrabackup: Error: failed to read page after 10 retries. File ./ibdata1 seems to be corrupted.

[01] xtrabackup: Error: xtrabackup_copy_datafile() failed.

[01] xtrabackup: Error: failed to copy datafile.

230704 09:24:58 >> log scanned up to (24491496343)

```

```auto
innochecksum -p 192 /store/vc/ibdata1

Fail: page 192 invalid

Exceeded the maximum allowed checksum mismatch count::0

```

```auto
mysql --version
mysql Ver 8.0.23-14 for Linux on x86_64 (Percona Server (GPL), Release '14', Revision '3558242')

```

```auto
xtrabackup --version
xtrabackup version 8.0.25-17 based on MySQL server 8.0.25 Linux (x86_64) (revision id: d27028b)

```

---

<div class="post-metadata">

**Author:** ![kedarpercona](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kedarpercona/32/809_2.png) [@kedarpercona](https://forums.percona.com/u/kedarpercona)\
**Post date:** [July 4, 2023, 10:01am UTC](https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343/2 "2023-07-04T10:01:10Z")

</div>

Hi @jegana,

Can you try using appropriate xtrabackup for `mysql Ver 8.0.23-14`. I see you’re using xtrabackup 8.0.25.

Thanks,  
K

---

<div class="post-metadata">

**Author:** ![jegana](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jegana](https://forums.percona.com/u/jegana)\
**Post date:** [July 4, 2023, 10:40am UTC](https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343/3 "2023-07-04T10:40:42Z")

</div>

@kedarpercona Thanks for your reply. Should the versions of both MySQL and XtraBackup be identical

---

<div class="post-metadata">

**Author:** ![kedarpercona](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kedarpercona/32/809_2.png) [@kedarpercona](https://forums.percona.com/u/kedarpercona)\
**Post date:** [July 4, 2023, 10:47am UTC](https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343/4 "2023-07-04T10:47:22Z")

</div>

sure @jegana, that’s correct.

---

<div class="post-metadata">

**Author:** ![jegana](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jegana](https://forums.percona.com/u/jegana)\
**Post date:** [July 4, 2023, 10:58am UTC](https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343/5 "2023-07-04T10:58:24Z")

</div>

But in this [link](https://docs.percona.com/percona-xtrabackup/8.0/server-backup-version-comparison.html) mentioned that xtrabackup version can be equal or higher than source server(mysql) version. In my case I am having higher version of xtrabackup than mysql version.

```auto
mysql --version
mysql Ver 8.0.23-14 for Linux on x86_64 (Percona Server (GPL), Release '14', Revision '3558242')

```

```auto
xtrabackup --version
xtrabackup version 8.0.25-17 based on MySQL server 8.0.25 Linux (x86_64) (revision id: d27028b)

```

---

<div class="post-metadata">

**Author:** ![jegana](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jegana](https://forums.percona.com/u/jegana)\
**Post date:** [July 4, 2023, 11:39am UTC](https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343/6 "2023-07-04T11:39:13Z")

</div>

Tried both with same version even though facing the same issue.

```auto
mysql --version
mysql Ver 8.0.31-23 for Linux on x86_64 (Percona Server (GPL), Release '23', Revision '71449379')

```

```auto
xtrabackup --version
xtrabackup version 8.0.31-24 based on MySQL server 8.0.31 Linux (x86_64) (revision id: f0754edb)

```

---

<div class="post-metadata">

**Author:** ![kedarpercona](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kedarpercona/32/809_2.png) [@kedarpercona](https://forums.percona.com/u/kedarpercona)\
**Post date:** [July 4, 2023, 1:33pm UTC](https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343/7 "2023-07-04T13:33:29Z")

</div>

Hello @jegana

It appears that you’re trying to create a backup.

- Can you provide with the backup command you’re using?
- Also can you verify mysql error logs for no issues? Is your database OK? (I ask this to confirm if your database is not already corrupted, if so, backup is not going to work)

Also, `innochecksum to fix the corrupted file` → this is not right. Innochecksum will only print the checksum for innodb file.

Thanks,  
K.

---

<div class="post-metadata">

**Author:** ![jegana](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jegana](https://forums.percona.com/u/jegana)\
**Post date:** [July 5, 2023, 9:35am UTC](https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343/8 "2023-07-05T09:35:44Z")

</div>

Hello @kedarpercona

It is newly build server so I believe that there will be no chances for database corrupted. I have used the following commend to take the backup and got below message in mysql error.log.

> xtrabackup --backup --target-dir=/var/tmp/backupxtra -u root

> 2023-07-05T09:34:15.383470Z 464 [Warning] [MY-013712] [Server] No suitable ‘keyring\_component\_metadata\_query’ service implementation found to fulfill the request.

---

<div class="post-metadata">

**Author:** ![kedarpercona](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kedarpercona/32/809_2.png) [@kedarpercona](https://forums.percona.com/u/kedarpercona)\
**Post date:** [July 15, 2023, 10:25am UTC](https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343/9 "2023-07-15T10:25:59Z")

</div>

Hi @jegana,  
So your error from the log is [known bug](https://bugs.mysql.com/bug.php?id=103684) and is harmless  
WRT what you’re trying to achieve.

Also `mysql` is client and that could be of different version than the server `mysqld`. Can you confirm the server version?  
`mysql> SELECT VERSION();`

About the error `File ./ibdata1 seems to be corrupted` can you confirm if your backup ` --target-dir=/var/tmp/backupxtra` has sufficient space? Could you try changing that path?

Thanks,  
K.

---

<div class="post-metadata">

**Author:** ![jegana](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jegana](https://forums.percona.com/u/jegana)\
**Post date:** [July 17, 2023, 6:38am UTC](https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343/10 "2023-07-17T06:38:05Z")

</div>

Hey @kedarpercona

Both the mysql client and mysqld versions are same. I have sufficient space for target-dir and tried with different target dir as well but the results are same.

Can you pls suggest me how to fix the corrupted table.

**mysqld version**

```auto
mysql> SELECT VERSION();

+-----------+

| VERSION() |

+-----------+

| 8.0.33-25 |

+-----------+

1 row in set (0.00 sec)

```

**mysql version**

```auto
mysql --version
mysql Ver 8.0.33-25 for Linux on x86_64 (Percona Server (GPL), Release '25', Revision '60c9e2c5')

```

---

<div class="post-metadata">

**Author:** ![lalit.choudhary](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/lalit.choudhary/32/51_2.png) [@lalit.choudhary](https://forums.percona.com/u/lalit.choudhary)\
**Post date:** [July 17, 2023, 7:04am UTC](https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343/11 "2023-07-17T07:04:46Z")

</div>

@jegana  
Check and let us know if you see any corruption message on the source MySQL error log.

Other possible options to test and fix the issue:

- Do you have a replica? If yes, try taking xtrabackup from it and see if it works.
- If the database size is small, you can take a logical full backup of databases and restore to fix filesystem-level corruption.

---

<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:** [July 17, 2023, 10:14am UTC](https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343/12 "2023-07-17T10:14:25Z")

</div>

Hi @jegana

> [@jegana](#):
>
> ```auto
> innochecksum -p 192 /store/vc/ibdata1
> 
> Fail: page 192 invalid
> 
> Exceeded the maximum allowed checksum mismatch count::0
> 
> ```

This message tells you that page 192 is invalid. Xtrabackup is just reporting the same.  
The only way to overcome this is to attempt a logical backup (mysqldump) and restore on a brand new instance.

---

<div class="post-metadata">

**Author:** ![jegana](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jegana](https://forums.percona.com/u/jegana)\
**Post date:** [July 17, 2023, 12:45pm UTC](https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343/13 "2023-07-17T12:45:41Z")

</div>

Hey @Marcelo_Altmann

Sure. I will give a try and share you how it is working.

---

<div class="post-metadata">

**Author:** ![jegana](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jegana](https://forums.percona.com/u/jegana)\
**Post date:** [October 10, 2023, 10:28am UTC](https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343/14 "2023-10-10T10:28:52Z")

</div>

I don’t encounter the reported error when my application runs on unencrypted AWS EBS volume, but I do encounter the reported error when my application runs on an encrypted AWS EBS volume. Any reason the Xtrabackup is working differently on encrypted and unencrypted volumes.

---

<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:** [October 23, 2023, 9:53am UTC](https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343/15 "2023-10-23T09:53:31Z")

</div>

FYI: [Xtrabackup - Issue with encrypted volume](https://forums.percona.com/t/xtrabackup-issue-with-encrypted-volume/25813/)

---

<div class="post-metadata">

**Author:** ![vimal\_sai](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vimal_sai/32/12203_2.png) [@vimal\_sai](https://forums.percona.com/u/vimal_sai)\
**Post date:** [November 16, 2023, 2:19pm UTC](https://forums.percona.com/t/xtrabackup-database-page-corruption-detected-at-page/23343/16 "2023-11-16T14:19:38Z")

</div>

We did further checking using innochecksum and the output is as below.  
innochecksum -f /store2/ibdata1  
Unknown file format flags: 18432  
Please note that innochecksum per ibd files are working fine and it is failing only for ibdata1 file. Any clue on this file  
format flags?
