O'Reilly logo

Managing & Using MySQL, 2nd Edition by Hugh E. Williams, Randy Yarger, George Reese, Tim King

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required