2

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?

1 Answer 1

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.

1
  • 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, 2010 at 7:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .