I'm an application developer and wondering about our database backup strategy. Right now our sysadmins backup our database every 8 hours. I don't really know how the do it, but while the backup is running our application response time goes through the roof. So every 8 hours, the application is slow and sometimes even produces errors.
Is there a way to backup a MySQL database with MyISAM tables without slowing application code and still get a consistent backup?
Best Answer
A) Take the backup from a replicating slave. Zero performance loss.
B) Use LVM to take a consistent snapshot. Copy the database files at your leisure.
C) Use Rsync over a remote connection to copy the data files, then do a final Rsync with the database briefly locked for a couple seconds.
As an aside, how are they taking a consistent backup with MyISAM tables without LOCKING the application for 8 hours straight? It doesn't seem possible.