MySQL Enterprise Backup User's Guide (Version 3.12.5)

13.3 Restore Operations

The restore operations restores the data files from a backup to their original locations on the database server, or to other desired locations. The MySQL instance must be shut down first before a restore operation (except for backups created using transportable tablespace (TTS)). The options datadir, innodb_log_files_in_group, and innodb_log_file_size must be specified either in the target server's configuration file, in the file specified by the --defaults-file option, or as command-line options. For usage examples, see Chapter 5, Recovering or Restoring a Database.

mysqlbackup [STD-OPTIONS]
            [SERVER-REPOSITORY-OPTIONS]
            [--backup-dir=PATH]
            [--uncompress]
            [MESSAGE-LOGGING-OPTIONS]
            [PARTIAL-BACKUP-RESTORE-OPTIONS]
            [PROGRESS-REPORT-OPTIONS]
            [CLOUD-STORAGE-OPTIONS]
            copy-back

mysqlbackup [STD-OPTIONS]
            [SERVER-REPOSITORY-OPTIONS]
            [--backup-image=IMAGE]
            [--backup-dir=PATH]
            [--uncompress]
            [MESSAGE-LOGGING-OPTIONS]
            [PARTIAL-BACKUP-RESTORE-OPTIONS]
            [PROGRESS-REPORT-OPTIONS]
            [ENCRYPTION-OPTIONS]
            [CLOUD-STORAGE-OPTIONS]
            copy-back-and-apply-log 
Warning

When restoring a server for replication purpose, if the backed-up server has used the innodb_undo_directory option to put the undo logs outside of the data directory, when using the file server-my.cnf or server-all.cnf for the --defaults-file option with copy-back or copy-back-and-apply-log, care should be taken to configure correctly the innodb_undo_directory option in the file. Otherwise, the data or log files on the original server might be overwritten by accident.