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
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:
systemctl stop mysql
rm -rf /var/lib/mysql/*
(Extract the archive) xbstream -C /var/lib/mysql/ -vx <full_backup.xbs
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
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
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
xtrabackup version 8.0.35-31 based on MySQL server 8.0.35 Linux (x86_64) (revision id: 55ec21d7)
&&
mysql Ver 14.14 Distrib 5.7.42, for Linux (x86_64) using EditLine wrapper
i got this after running xtrabackup --prepare --target-dir /var/lib/mysql --use-memory 4G
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.
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.
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?
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.
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.
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
Hello @uellla,
If you need immediate assistance with some 1:1 time, you can contact our support department. If that isn’t something you need, I recommend reading over our extensive documentation on PXB 2.4. Be sure to look at the HOWTO and Recipes sections for real-world examples.
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
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.