# What requirements to restore an old backup

**URL:** <https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148>\
**Category:** Percona XtraBackup\
**Created:** [January 15, 2025, 1:41am UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148 "2025-01-15T01:41:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![uellla](https://avatars.discourse-cdn.com/v4/letter/u/ecd19e/32.png) [@uellla](https://forums.percona.com/u/uellla)\
**Post date:** [January 15, 2025, 1:41am UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/1 "2025-01-15T01:41:28Z")

</div>

Xtrabackup is a whole new thing to me and the task i was assigned needs me to put that into that,  
anyway, how can i start restoring it, I have tried several different approaches to different backups  
a. installed xtrabackup 2.4 with mysql 57 \> succeeded  
b. tried the whole same steps and nothing happened, knowing that the problem here is mysql server didn’t work

my question is, how can i know what requirement should i install to restore the backup, and is there any different approach,  
thanks in advance

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [January 15, 2025, 3:47am UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/2 "2025-01-15T03:47:28Z")

</div>

Hello @uellla ,

> [@uellla](#):
>
> b. tried the whole same steps and nothing happened,

If you tried to repeat the restore process, then this is expected. Once you run `xtrabackup --prepare`, you cannot run that command again, as the backup has already been prepared.

Info:  
`xtrabackup --backup --stream=xbstream --compress --parallel 4 >full_backup.xbs`  
This will create a full backup in a single, compressed, archive file. Copy this file to your backup vault, where you store backups. Do not store backups on the same machine as MySQL as if you lose this server, you have also lost the backups.

For restore, you will restore the entire database, which means you must start with an empty, and non-running MySQL:

1. systemctl stop mysql
2. rm -rf /var/lib/mysql/\*
3. (Extract the archive) `xbstream -C /var/lib/mysql/ -vx <full_backup.xbs`
4. (Decompress the backup) `xtrabackup --decompress --target-dir /var/lib/mysql --remove-original --compress-threads 4 --parallel 4`
5. (Prepare backup) `xtrabackup --prepare --target-dir /var/lib/mysql --use-memory 4G`
6. (Fix permissions) `chown -R mysql:mysql /var/lib/mysql`
7. (Start mysql) `systemctl start mysql`

That’s pretty much the process in 98% of cases. There is [LOTS of documentation](https://docs.percona.com/percona-xtrabackup/8.0/create-full-backup.html) to read with many examples.

---

<div class="post-metadata">

**Author:** ![uellla](https://avatars.discourse-cdn.com/v4/letter/u/ecd19e/32.png) [@uellla](https://forums.percona.com/u/uellla)\
**Post date:** [January 17, 2025, 10:48pm UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/3 "2025-01-17T22:48:23Z")

</div>

Hello,  
THANK YOU for replying so fast . didn’t expect a reply so soon that’s why i reply late,  
anyway i did everything in order as you mention and this is what popped up after starting mysql

```auto
root@lab:/mnt/e# systemctl start mysql
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xeu mysql.service" for details.

```

i run

```auto
Linux lab5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

```

```auto
xtrabackup version 8.0.35-31 based on MySQL server 8.0.35 Linux (x86_64) (revision id: 55ec21d7)

```

&&

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

```

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [January 17, 2025, 11:55pm UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/4 "2025-01-17T23:55:14Z")

</div>

> [@uellla](#):
>
> `xtrabackup version 8.0.35-31 based on MySQL server 8.0.35 Linux`  
> &&  
> mysql Ver 14.14 Distrib 5.7.42, for Linux (x86\_64) using EditLine wrapper

No. You cannot run Xtrabackup 8.0.35 against MySQL 5.7. You need to install Xtrabackup 2.4.

---

<div class="post-metadata">

**Author:** ![uellla](https://avatars.discourse-cdn.com/v4/letter/u/ecd19e/32.png) [@uellla](https://forums.percona.com/u/uellla)\
**Post date:** [January 18, 2025, 12:47am UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/5 "2025-01-18T00:47:59Z")

</div>

i got this after running xtrabackup --prepare --target-dir /var/lib/mysql --use-memory 4G

```auto
xtrabackup version 2.4.29 based on MySQL server 5.7.44 Linux (x86_64) (revision id: 2e6c0951)
xtrabackup: cd to /var/lib/mysql/
xtrabackup: This target seems to be not prepared yet.
InnoDB: Number of pools: 1
xtrabackup: No valid checkpoint found.
xtrabackup: Error: xtrabackup_init_temp_log() failed.

```

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [January 18, 2025, 4:22am UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/6 "2025-01-18T04:22:11Z")

</div>

You must take the backup of 5.7 using PXB 2.4. You can’t take a backup of 5.7 using PXB 8. Show the command from PXB 2.4 taking a backup of 5.7. Include the last 50 lines of the output.

---

<div class="post-metadata">

**Author:** ![uellla](https://avatars.discourse-cdn.com/v4/letter/u/ecd19e/32.png) [@uellla](https://forums.percona.com/u/uellla)\
**Post date:** [January 18, 2025, 12:05pm UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/7 "2025-01-18T12:05:28Z")

</div>

I didn’t make the backup myself, the previous technician did, and there is no way to find him or his logs.  
so for me it’s a guessing game with your help.  
can you please tell me how to proceed?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [January 19, 2025, 12:59am UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/8 "2025-01-19T00:59:05Z")

</div>

> [@uellla](#):
>
> ```auto
> xtrabackup: No valid checkpoint found.
> 
> ```

This is an error with the original backup. Without the checkpoints file, this backup is useless. Check the original backup archive and see if `xtrabackup_checkpoints` file is there. If not, then you might as well delete the backup and just start a new backup process.

---

<div class="post-metadata">

**Author:** ![uellla](https://avatars.discourse-cdn.com/v4/letter/u/ecd19e/32.png) [@uellla](https://forums.percona.com/u/uellla)\
**Post date:** [January 19, 2025, 2:38am UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/9 "2025-01-19T02:38:58Z")

</div>

this what i have here

```auto
root@lab:/mnt/e# ls /var/lib/mysql
__recycle_bin__ mysql.ibd xtrabackup_checkpoints
backup-my.cnf performance_schema xtrabackup_info
crm rds_table_info_json_122894.log xtrabackup_logfile
ibdata1 sys xtrabackup_slave_info
mysql undo_001 xtrabackup_tablespaces
mysql-bin.000865 undo_002
mysql-bin.index xtrabackup_binlog_info

```

`xtrabackup_checkpoints`

```auto
root@lab:/var/lib/mysql# cat xtrabackup_checkpoints
backup_type = full-backuped
from_lsn = 0
to_lsn = 1099701219646
last_lsn = 1094352835424
flushed_lsn = 0

```

The problem i am facing at the moment is that the system is damaged and this is the only backup we have

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [January 20, 2025, 5:56pm UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/10 "2025-01-20T17:56:48Z")

</div>

> [@uellla](#):
>
> and this is the only backup we have

I hope you made a copy of the backup before you ran any commands. Anytime you need to restore, you should be operating on a copy of the backup, and not the backup itself.

I do see the `xtrabackup_checkpoints` file in your list. Try enabling verbose/debug logs on PXB and see if there is additional information.

---

<div class="post-metadata">

**Author:** ![uellla](https://avatars.discourse-cdn.com/v4/letter/u/ecd19e/32.png) [@uellla](https://forums.percona.com/u/uellla)\
**Post date:** [January 20, 2025, 8:26pm UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/11 "2025-01-20T20:26:08Z")

</div>

Yes i’m working on a copy of the backup compressed file, and this PXB world is totally new to me, could you assist me with this?  
i spent 7 days with this and i already lost it

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [January 20, 2025, 10:41pm UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/12 "2025-01-20T22:41:47Z")

</div>

Hello @uellla,  
If you need immediate assistance with some 1:1 time, you can contact our [support department](https://percona.com/support). If that isn’t something you need, I recommend reading over our [extensive documentation](https://docs.percona.com/percona-xtrabackup/2.4/) on PXB 2.4. Be sure to look at the HOWTO and Recipes sections for real-world examples.

---

<div class="post-metadata">

**Author:** ![uellla](https://avatars.discourse-cdn.com/v4/letter/u/ecd19e/32.png) [@uellla](https://forums.percona.com/u/uellla)\
**Post date:** [January 20, 2025, 11:08pm UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/13 "2025-01-20T23:08:26Z")

</div>

Thank you for your replies so far, i will keep digging maybe i will find something somewhere.

---

<div class="post-metadata">

**Author:** ![uellla](https://avatars.discourse-cdn.com/v4/letter/u/ecd19e/32.png) [@uellla](https://forums.percona.com/u/uellla)\
**Post date:** [January 21, 2025, 10:19pm UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/14 "2025-01-21T22:19:21Z")

</div>

Hello @matthewb,  
i was just looking around and i opened the xtrabackup\_info file  
i found this

```auto
tool_version = 8.0.8
ibbackup_version = 8.0.8
server_version = 8.0.18-X-Cluster-1.0.8

```

do i need to use the same version to restore the backup?  
can you kindly help me out

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [January 21, 2025, 10:54pm UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/15 "2025-01-21T22:54:30Z")

</div>

Yes, use the same PXB version.

---

<div class="post-metadata">

**Author:** ![uellla](https://avatars.discourse-cdn.com/v4/letter/u/ecd19e/32.png) [@uellla](https://forums.percona.com/u/uellla)\
**Post date:** [January 22, 2025, 12:14am UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/16 "2025-01-22T00:14:26Z")

</div>

how can i do such thing?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [January 22, 2025, 12:27am UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/17 "2025-01-22T00:27:41Z")

</div>

Install via our repos.

> **[Percona XtraBackup - Install Percona XtraBackup 8.0 overview](https://docs.percona.com/percona-xtrabackup/8.0/installation.html)**
>
> We recommend that you install Percona XtraBackup 8.0 from the official Percona software repositories using the appropriate package manager for your system:

---

<div class="post-metadata">

**Author:** ![uellla](https://avatars.discourse-cdn.com/v4/letter/u/ecd19e/32.png) [@uellla](https://forums.percona.com/u/uellla)\
**Post date:** [January 22, 2025, 12:35am UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/18 "2025-01-22T00:35:54Z")

</div>

Excuse my lack of technical knowledge, but in order to install the same versions of pxb and ps i need to know how?  
nowhere to find a clue to install that version

> **[Percona XtraBackup - Percona XtraBackup 8.0.8](https://docs.percona.com/percona-xtrabackup/8.0/release-notes/8.0/8.0.8.html)**
>
> Percona is glad to announce the release of Percona XtraBackup 8.0.8 on November 21, 2019.
> Downloads are available from our download site and from
> apt and yum repositories.

---

<div class="post-metadata">

**Author:** ![uellla](https://avatars.discourse-cdn.com/v4/letter/u/ecd19e/32.png) [@uellla](https://forums.percona.com/u/uellla)\
**Post date:** [January 22, 2025, 12:46am UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/19 "2025-01-22T00:46:15Z")

</div>

I’m sorry after a bit of concentration i found what i was looking for

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [January 22, 2025, 12:46am UTC](https://forums.percona.com/t/what-requirements-to-restore-an-old-backup/36148/20 "2025-01-22T00:46:25Z")

</div>

You can use your operating system’s package manager and our repo to install the same versions of PS and PXB. You’ll need to find documentation on your OS’s package manager on how to install specific versions.
