Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

My understanding is mysqlhotcopy works very similar to rsync.

In one of our servers backing the database file using rsync takes about 15 minutes for 50GB data.

Backing up the same data using mysqlhotcopy takes about 30 minutes.

How come mysqlhotcopy is significantly slower?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

rsync does not have any MySQL-specific gotchas to watch out for. rsync can copy literally anything with impunity.

mysqlhotcopy has to watch for opportunities to lock files which could delay actual start time for copying.

I wrote an earlier post contrasting rsync and XtraBackup along this line of reasoning

I also wrote a post on how to copy using rsync on a running mysql server with relative brief downtime.

Here is post I made in ServerFault

Here is still another post in ServerFault, with sample code !!!

share|improve this answer
1  
I would add that mysqlhotcopy doesn't work similarly to rsync at all. rsync compares files and copies changed blocks. mysqlhotcopy just copies files. –  Baron Schwartz Mar 16 '12 at 0:29
    
@BaronSchwartz Thank for the additional clarification. –  RolandoMySQLDBA Mar 16 '12 at 0:42
add comment

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.