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

5.2 Performing a Restore Operation

The mysqlbackup option to perform a restore operation is copy-back. The restoration process requires the database server to be already shut down. It copies the data files, logs, and other backed-up files from the backup directory back to their original locations, and performs any required post-processing on them. 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.

Example 5.4 Shutting Down and Restoring a Database

mysqladmin --defaults-file=/usr/local/mysql/my.cnf --user=root --password shutdown
mysqlbackup --defaults-file=/usr/local/mysql/my.cnf \
  --backup-dir=/export/backups/full \


The restored data includes the backup_history table, where MySQL Enterprise Backup records details of each backup. Restoring this table to its earlier state removes information about any subsequent backups that you did. This is the correct starting point for future incremental backups, particularly those using the --incremental-base option.


Before restoring a partial backup, you might need to delete first from the backup the .frm files associated with InnoDB tables that were not backed up. See Section 4.1.9, “Partial Backup Options” and Section, “Backing Up Some or All InnoDB Tables” for details.

User Comments
  Posted by Stefan Lasiewski on September 2, 2014
Don't forget, you probably want to do the restore as the user which runs mysql (normally the user named 'mysql') and not as the Unix root user.
Sign Up Login You must be logged in to post a comment.