Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm getting a weir error in our disc for backups. I setup a simple script:

mysqlhotcopy --allowold  $db /backup/databasebackups/;

This goes through all the databases.

It works until I got some big databases and the backup started to take forever to execute. mysqlhotcopy ends very fast in the main db, but takes forever in other dbs that are actually production copies for a new development.

According to our server managers, the disk has no issues and the information is being copied correctly. What should I do to address this? Should I change disks or something?

share|improve this question

The first thing is to verify where the problem is. From your description, it doesn't immediately seem like it's the disk.

My suspicion is it's mysqlhotcopy that's blocking. mysqlhotcopy has to lock the tables, for one thing, so if anything is conflicting with it... You can readily test this yourself, just sign and try to do a FLUSH TABLES and a LOCK TABLES on the relevant database.

share|improve this answer
Backing up live databases can take a very long time because of this. If is important to you to have quick-executing backups (and I can certainly see the business case), you might want to get into fine-tuning binary logging and replicating the binary log to "somewhere else" and only run "real" backups from the live DB when it's less busy. Drawback is slower restores because the DB has to execute the log to restore later transactions than the last full backup. – Bernd Haug Jan 25 '10 at 7:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.