Faster MySQL backup

Recently the MySQL backup has been killing the (already loaded) server. I was doing backup using mysqldump and then piping it into bzip2. Both commands put a heavy load on the processor and in fact made the site virtually unusable in the very early morning.

As I am currently using MyISAM I can instead take advantage of mysqlhotcopy which is doing the backup in less than a hundredth of the time with virtually no load!

It is an important reminder that when you are looking at optimising the performance of a server it’s not just about the application code, it’s also about sysadmin scripts.

Reminder to me: If the site every changes to InnoDB then the backup will need to be revisited.

Leave a Reply

You must be logged in to post a comment.