innodb backup

what is your strategy for backing up a very large high traffic innodb database? if you can provide a brief script that would be great.

I know of a few options, you’ve got mysql hotbackup, it’s a snapshot-type backup tool but isn’t free.

For small databases you can do a dump like:

mysqldump --master-data=1 --single-transaction >DB.dump


The --master-data option automatically turns off --lock-tables. It also turns on --lock-all-tables, unless --single-transaction also is specified (in which case, a global read lock is acquired only for a short time at the beginning of the dump. See also the description for --single-transaction. In all cases, any action on logs happens at the exact moment of the dump.