Compressed Backup - Percona XtraBackup
Compressed Backup - Percona XtraBackup
Compressed Backup
Percona XtraBackup supports compressed backups: a local or streaming backup
can be compressed or decompressed with xbstream.
The xtrabackup --compress uses the qpress tool that you can install via the
percona-release package configuration tool as follows:
Note
Enable the repository: percona-release enable-only tools release . If you intend to use
Percona XtraBackup in combination with the upstream MySQL Server, you only need
to enable the tools repository: percona-release enable-only tools .
If you want to speed up the compression you can use the parallel compression,
which can be enabled with xtrabackup –compress-threads option. Following
example will use four threads for compression:
https://docs.percona.com/percona-xtrabackup/2.4/backup_scenarios/compressed_backup.html 1/3
19/06/2024, 20:35 Compressed Backup - Percona XtraBackup
Before you can prepare the backup you must uncompress all the files. Percona
XtraBackup has implemented xtrabackup --decompress option that can be used to
decompress the backup.
Note
When the files are uncompressed you can prepare the backup with the
xtrabackup --prepare option:
https://docs.percona.com/percona-xtrabackup/2.4/backup_scenarios/compressed_backup.html 2/3
19/06/2024, 20:35 Compressed Backup - Percona XtraBackup
The option copies all the data-related files back to the server’s datadir ,
determined by the server’s my.cnf configuration file. Check the last line of the
output for a success message:
Verify the file permissions after copying the data back. You may need to adjust
the permissions. For example, the following command changes the owner of the
file location:
Now that the datadir contains the restored data. You are ready to start the
server.
Contact us
2022-11-10
https://docs.percona.com/percona-xtrabackup/2.4/backup_scenarios/compressed_backup.html 3/3