rail’d

Fight the framework! 
« Back to blog

Live backup of INNODB tables using mysqldump in a single transaction

Use this to dump all tables for a database that is all (or mostly)
INNODB tables. The CHANGE MASTER statement will be included, so you
just need to START SLAVE.
 
Using --single-transaction puts everything in a single transaction
(duh). Check that any non-transactional tables (e.g. MyISAM) will be
static during the dump, as the --single-transaction option counteracts
the --lock-all-tables option implicit in --opt. Phew.

mysqldump --single-transaction --opt -Q -u root -p --routines
--master-data

See http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html.>

Loading mentions Retweet

Comments (0)

Leave a comment...

 
Got an account with one of these? Login here, or just enter your comment below.
Posterous-login    Connect    twitter