# Restore xtrabackup backup fails (mysql) \[URGENT\]

**URL:** <https://forums.percona.com/t/restore-xtrabackup-backup-fails-mysql-urgent/26094>\
**Category:** Percona XtraBackup\
**Created:** [October 22, 2023, 6:33pm UTC](https://forums.percona.com/t/restore-xtrabackup-backup-fails-mysql-urgent/26094 "2023-10-22T18:33:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ilya\_Rodionov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ilya_rodionov/32/13477_2.png) [@Ilya\_Rodionov](https://forums.percona.com/u/Ilya_Rodionov)\
**Post date:** [October 22, 2023, 6:33pm UTC](https://forums.percona.com/t/restore-xtrabackup-backup-fails-mysql-urgent/26094/1 "2023-10-22T18:33:22Z")

</div>

Hello.  
I have my mysql master server fails with disk failure. I was doing mysql backup using pmm and sending them to my s3 server.  
I used a “full” backup.

Now i set up a new mysql server clean and running (apt-get install mysql, mysql\_secure\_installation) and so on. Now i want to restore my backup (xtrabackup binary file have the same version as in mysql master server), but it fails.

Here is my command: ` xtrabackup --prepare --target-dir=/var/tmp/minio/mysql-master-backup-full_2023-10-22T00:00:00Z` and here is an output

```auto
xtrabackup version 2.3.10 based on MySQL server 5.6.24 Linux (x86_64) (revision id: bd0d4403f36)
xtrabackup: cd to /var/tmp/minio/mysql-master-backup-full_2023-10-22T00:00:00Z/
xtrabackup: Error: cannot open ./xtrabackup_checkpoints
xtrabackup: Error: failed to read metadata from './xtrabackup_checkpoints'

```

What is more - i havent `xtrabackup_checkpoints` file here, just something like this

```auto
ls -l | grep xtra
-rw-r--r-- 1 root root 172 Oct 22 20:33 xtrabackup_binlog_info.qp.00000000000000000000
-rw-r--r-- 1 root root 39 Oct 22 20:33 xtrabackup_binlog_info.qp.00000000000000000001
-rw-r--r-- 1 root root 150 Oct 22 21:02 xtrabackup_checkpoints.00000000000000000000
-rw-r--r-- 1 root root 36 Oct 22 20:33 xtrabackup_checkpoints.00000000000000000001
-rw-r--r-- 1 root root 636 Oct 22 20:33 xtrabackup_info.qp.00000000000000000000
-rw-r--r-- 1 root root 32 Oct 22 20:33 xtrabackup_info.qp.00000000000000000001
-rw-r--r-- 1 root root 1418101 Oct 22 20:33 xtrabackup_logfile.qp.00000000000000000000
-rw-r--r-- 1 root root 35 Oct 22 20:33 xtrabackup_logfile.qp.00000000000000000001

```

Also when i am using `cat *checkpoints` there is also some corrupted text like this

```auto
XBSTCK01Extrabackup_checkpointsbackup_type = full-backuped
from_lsn = 0
to_lsn = 114023178266
last_lsn = 114027601203
compact = 0
recover_binlog_info = 0
flushed_lsn = 114027339420

```

Also if this important for example inside database folders i have files like this

```auto
*.idb.qp.*
*frm*

```

and so on

I really need your help, because this is a very important production server and i do not want to loose all of my data. Please

---

<div class="post-metadata">

**Author:** ![Mauricio\_Cacho](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mauricio_cacho/32/5859_2.png) [@Mauricio\_Cacho](https://forums.percona.com/u/Mauricio_Cacho)\
**Post date:** [October 22, 2023, 7:12pm UTC](https://forums.percona.com/t/restore-xtrabackup-backup-fails-mysql-urgent/26094/2 "2023-10-22T19:12:43Z")

</div>

Hi @Ilya_Rodionov .

The qp files means the backup is compressed, you can retry adding the `--decompress` flag.

Also, it looks like you’re using XtraBackup 2.3; what is the MySLQ version? XB 2.3 is obsolete.

Best,  
Mauricio.

---

<div class="post-metadata">

**Author:** ![Ilya\_Rodionov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ilya_rodionov/32/13477_2.png) [@Ilya\_Rodionov](https://forums.percona.com/u/Ilya_Rodionov)\
**Post date:** [October 22, 2023, 8:14pm UTC](https://forums.percona.com/t/restore-xtrabackup-backup-fails-mysql-urgent/26094/3 "2023-10-22T20:14:36Z")

</div>

i am using `mysql Ver 14.14 Distrib 5.7.42, for Linux (x86_64) using EditLine wrapper`

but anyway i can not initialize --prepare because of `xtrabackup_checkpoints` file missing.

or i should update/use more latest version of this binary and try again?

---

<div class="post-metadata">

**Author:** ![yunus\_shaikh](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/yunus_shaikh/32/3512_2.png) [@yunus\_shaikh](https://forums.percona.com/u/yunus_shaikh)\
**Post date:** [October 23, 2023, 7:54am UTC](https://forums.percona.com/t/restore-xtrabackup-backup-fails-mysql-urgent/26094/4 "2023-10-23T07:54:25Z")

</div>

> [@Ilya\_Rodionov](#):
>
> i am using `mysql Ver 14.14 Distrib 5.7.42, for Linux (x86_64) using EditLine wrapper`

Xtrabackup version is based on  
xtrabackup version 2.3.10 based on MySQL server 5.6.24 Linux (x86\_64)

So you will have to upgrade your xtrabackup binaries.  
Can you post us the command that you used to take backup?  
Also was there any error during the backup which you noticed?  
Also, the host where you took the backup also have the same version of xtrabackup installed?

---

<div class="post-metadata">

**Author:** ![Ilya\_Rodionov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ilya_rodionov/32/13477_2.png) [@Ilya\_Rodionov](https://forums.percona.com/u/Ilya_Rodionov)\
**Post date:** [October 23, 2023, 9:25am UTC](https://forums.percona.com/t/restore-xtrabackup-backup-fails-mysql-urgent/26094/5 "2023-10-23T09:25:23Z")

</div>

you are right. i can not upgrade xtrabackup binary file because it says that backup cannot be restored to mysql 5, instead i should use mysql 8.

> Can you post us the command that you used to take backup?

i am using backup via pmm ui, so here it is -

 ![Снимок экрана 2023-10-23 в 12.22.08](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/8/869a4f96b104b309af25990c2bc32113992f7128.png)

> Also was there any error during the backup which you noticed?

no, all backups are green and ok

> Also, the host where you took the backup also have the same version of xtrabackup installed?

yes

* * *

Right now i faced with another problem - i used a xbcloud [Use the xbcloud binary with Amazon S3 - Percona XtraBackup](https://docs.percona.com/percona-xtrabackup/8.0/xbcloud-s3.html#permissions-setup) to download my backup from s3, then used a xtrabackup to decompress and then prepare backup.

decompress was ok, but --prepare fails with error

```auto
xtrabackup --prepare --target-dir=/var/tmp/minio/s3
xtrabackup version 2.3.10 based on MySQL server 5.6.24 Linux (x86_64) (revision id: bd0d4403f36)
xtrabackup: cd to /var/tmp/minio/s3/
xtrabackup: This target seems to be not prepared yet.
xtrabackup: No valid checkpoint found.
xtrabackup: Error: xtrabackup_init_temp_log() failed

```

---

<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:44am UTC](https://forums.percona.com/t/restore-xtrabackup-backup-fails-mysql-urgent/26094/6 "2023-10-23T09:44:27Z")

</div>

Hi @Ilya_Rodionov  
As pointed before, you should be using xtrabackup 2.4 for a backup taken on a 5.7 server.  
Can you please try upgrading xtrabackup to 2.4 and if the problem persists, please send us the output of you xtrabackup\_info file.
