MySQL Enterprise Backup User's Guide (Version 8.0.16)

16.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. Normally, the restoration process requires the database server to be already shut down (or, at least not operating on the directory you are restoring the data to), except for restorations of backups created with the --use-tts option. The option datadir must be specified either in the file specified by the --defaults-file option or as a command-line option. For usage examples, see Chapter 5, Recovering or Restoring a Database.

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]
            [ENCRYPTED-INNODB-OPTIONS]
            copy-back-and-apply-log 
mysqlbackup [STD-OPTIONS]
            [SERVER-REPOSITORY-OPTIONS]
            [--backup-dir=PATH]
            [--uncompress]
            [MESSAGE-LOGGING-OPTIONS]
            [PARTIAL-BACKUP-RESTORE-OPTIONS]
            [PROGRESS-REPORT-OPTIONS]
            [CLOUD-STORAGE-OPTIONS]
            [ENCRYPTED-INNODB-OPTIONS]
            copy-back
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.