Percona XtraBackup

From DevOps Notebook
Revision as of 16:16, 21 March 2020 by MilosZ (talk | contribs) (Created page with "== Backup and restore with XtraBackup 8.0 == ''Note that credentials need to be in .my.cnf in home folder of running user'' Backup: <pre> $ xtrabackup --backup --target-dir=/p...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Backup and restore with XtraBackup 8.0

Note that credentials need to be in .my.cnf in home folder of running user Backup:

$ xtrabackup --backup --target-dir=/path/to/backups/
$ xtrabackup --prepare --target-dir=/path/to/backups/


Restore: Backup needs to be prepared before it can be restored
Method 1:

$ xtrabackup --copy-back --target-dir=/path/to/backups/

Method 2:

$ rsync -avrP /path/to/backup/ /var/lib/mysql/
$ chown -R mysql:mysql /var/lib/mysql