is a Perl script that uses a
TABLES, and Unix
cp to perform a fast backup of the database. It
simply copies the raw database files to another location. Because it
does only a file copy, it is much faster than
mysqldump. And because the copy is in native
format, the backup is not portable to other hardware or operating
systems, except for MyISAM tables, which are portable. Also,
mysqlhotcopy can be run only on the same host as
the database, whereas mysqldump can be executed
To run mysqlhotcopy, type:
$ mysqlhotcopy test /usr/backups
This command creates a new directory in the /usr/backups directory that has a copy of all the data files in the test database.
If you are using binary logging, you will also want to specify --flushlog, so the binary logs get checkpointed at the time of the backup.