Decompress and prepare a compressed backup¶
Before you can prepare the backup you’ll need to uncompress all the files.
Percona XtraBackup has implemented
that can be used to decompress the backup.
$ xtrabackup --decompress --target-dir=/data/compressed/
--parallel can be used with
--decompress option to decompress multiple files simultaneously.
Percona XtraBackup does not automatically remove the compressed files. In order to clean up the backup directory you should use
--remove-original option. Even if they’re not removed these files will not be copied/moved over to the datadir if
--move-back are used.
When the files are uncompressed you can prepare the backup with the
$ xtrabackup --prepare --target-dir=/data/compressed/
InnoDB: Starting shutdown... InnoDB: Shutdown completed; log sequence number 9293846 170223 13:39:31 completed OK!
Now the files in
/data/compressed/ are ready to be used by the server.
The next step is to restore the backup.