Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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. dev.mysql.com/doc/refman/5.0/en/binary-log.html –  Bernd Haug Jan 25 '10 at 7:27

Your Answer

 
discard

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.