Documentation Home
MySQL Enterprise Backup 9.0 User's Guide
Related Documentation Download this Manual
PDF (US Ltr) - 1.3Mb
PDF (A4) - 1.3Mb


5.1.1 Restoring a Compressed Backup

Note

The --uncompress option is no longer needed when restoring a compressed backup.

Restore a compressed backup image named <image_name>, using the --backup-dir option to specify the temporary directory into which temporary output, status files, and backup metadata will be saved:

Example 5.2 Restoring a Compressed Backup

mysqlbackup --defaults-file=<my.cnf> -uroot --backup-image=<image_name> \
  --backup-dir=<backupTmpDir> --datadir=<restoreDir> --uncompress copy-back-and-apply-log

Advanced: Do the same for a compressed directory backup at <backupDir> to <restoreDir> on the server using copy-back-and-apply-log:

Example 5.3 Restoring a Compressed Directory Backup

mysqlbackup --defaults-file=<my.cnf> -uroot --backup-dir=<backupDir> --datadir=<restoreDir> \
  --uncompress copy-back-and-apply-log

To restore a compressed and prepared directory backup created with the backup-and-apply-log command (which is only supported for MySQL Enterprise Backup 4.0.1 and later), use the copy-back command and the --uncompress option:

Example 5.4 Restoring a Compressed and Prepared Directory Backup

mysqlbackup --defaults-file=<my.cnf> -uroot --backup-dir=<backupDir> --datadir=<restoreDir> \
  --uncompress copy-back

See Section 4.3.4, “Making a Compressed Backup” and Section 20.6, “Compression Options” for more details on compressed backups.