mysqlhotcopy : mysqlhotcopy « MySQL Utilities « MySQL Tutorial






mysqlhotcopy is a command line utility written in Perl.

mysqlhotcopy backs up the files which make up a database.

mysqlhotcopy has the advantage of combining several different commands that lock the tables etc to prevent data corruption.

The syntax is:

$ mysqlhotcopy -u <username> -p <database> /backup/location/

Which SHOULD copy all the tables (*.frm, *.MYI, *.MYD) into the new directory.

The script does require the DBI perl module though.

To restore these backup files simply copy them back into your MySQL data directory.

26.5.mysqlhotcopy
26.5.1.mysqlhotcopy