Version 3.12.1

4.3.2. MySQL physical (Xtrabackup)

Use Percona Xtrabackup for physical backup restoration. More information can be found on the official documentation page [xtrabackup 8.0] [xtrabackup 2.4]

Feel free to use a version of xtrabackup, compatible with your database server version.

In general terms, the recovery order will be as follows: extract the backup to tmp directory, then restore it using xtrabackup.

Step-by-step instruction:

1. Unarchive the backup to tmp directory:

    $ tar -xvf 
    /var/nxs-backup/db/xtarbackup/production/daily/production_2022-07-08_02-12.tar.gz 
    -C /var/nxs-backup/tmp/recover

2. Prepare the backup for restoration. Skip this step if the option `prepare_xtrabackup` was enabled on backup creation.

    $ xtrabackup --prepare --target-dir=/var/nxs-backup/tmp/recover/


3. Perform the recovery:

    $ xtrabackup --move-back --target-dir=/var/nxs-backup/tmp/recover/