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


3.2.3 Restoring a Database at its Original Location

To restore a MySQL instance from a backup:

  • Shut down the database server using your usual technique, such as the command mysqladmin shutdown.

  • Make sure the backup data is fully consistent, by either using the backup-and-apply-log option to perform the backup, or running mysqlbackup with the apply-log option after the initial backup.

  • Use the mysqlbackup command with the copy-back option. This operation copies tables, indexes, metadata, and any other required files back to their original locations as defined by the original MySQL configuration file. For the different combinations of options that you can specify as part of this operation, see Section 4.1.1.3, “Restore an Existing Backup”.

$ mysqlbackup --defaults-file=path_to_my.cnf \
  --datadir=path_to_data_directory \
  --backup-dir=path_to_backup_directory copy-back
...many lines of output...
mysqlbackup: Finished copying backup files.

101208 16:48:13 mysqlbackup: mysqlbackup completed OK!

Now the original database directory is restored from the backup, and you can restart the database server.


User Comments
Sign Up Login You must be logged in to post a comment.