2

I'm using the following command to copy a large number of big video files to external drives.

rsync -Ph --inplace /Volumes/Production/Prefix* Prefix

We had a power failure and the copying was abrupted. With rsync it's no problem to just restart it, but the thing is that it takes quite a while for it to get back to where it was. It goes through every file and looks like it reads through the whole file. Its speed is reported to be around 3-5 times faster than what it usually is, up to when it gets to the point it starts to copy again.

What is it doing exactly during this time? Is it reading through the whole file and comparing it with the source? Or is it doing something else fancy? Is there a way to get rsync to skip completed files faster? For example tell it to only check files that have a different file size or something?

3 Answers 3

5

rsync has an option: --size-only which does what you want.

2

Rsync checks against mod-time and size of files by default. If you add a --checksum, then it will compare against the whole file (ie: regardless of mod-time and size matching).

2
  • I guess in my case the mod-time would be wrong since I don't have the -t switch? Is there a way I can make it skip the mod-time check and only check the size?
    – Svish
    Dec 15, 2010 at 19:16
  • 2
    I think -t is default, "--size-only" will skip the mod-time check. Dec 15, 2010 at 19:19
1

Since you didn't do -a for archive, it didn't copy over the times, so it thinks they are different files because of timestamp mismatch, and then it checksums the entire file.

If you're making copies where the time stamp could/should match: always include -a.

For now (although long ago) you can try adding --ignore-times

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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