mysqlhotcopy Recovery

To recover from a mysqlhotcopy backup, reload the database by copying the database files from the backup location to the mysql data location while the server is not running. Assuming the database is backed up in /var/backup/test and the mysql data location is /usr/local/mysql/data:

$ cp -R /var/backup/test /usr/local/mysql/data

This command brings the database back to the state of the last backup.

It is now safe to restart the mysql server and apply the binary logs as described in the previous section to bring the system up to date.

Get Managing & Using MySQL, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.