mysqldump
Sasha Pachev
sasha at asksasha.com
Thu Jan 1 11:17:39 MST 2009
The best way to back up a large MySQL database is via an LVM snapshot.
If that is not available, second best is FLUSH TABLES WITH READ LOCK,
tar the database directory, then UNLOCK TABLES. There is a script
mysqlsnapshot that does it for you
http://jeremy.zawodny.com/mysql/mysqlsnapshot/
or you can write your own.
If you have no LVM and uptime is more important than 100% data
integrity, the following hack may be practical too, at least it is
better than no backup:
FLUSH TABLES
tar the data directory
copy the tarball to another server with lots of spare CPU
repair the snapshot
There will be some data loss, but no more than the rows that were
modified between FLUSH TABLES and the end of the tar operation.
The above assumes MyISAM tables.
--
Sasha Pachev
AskSasha Linux Consulting
http://asksasha.com
Fast Running Blog.
http://fastrunningblog.com
Run. Blog. Improve. Repeat.
More information about the PLUG
mailing list