18

I'm trying to use rsync to backup some files from an internal harddisk to a usb-drive. (I'm working on a wd mybook world NAS)

There are two folders that I want to backup. A music folder and a video folder. The music folder(864 files, round about 10gb) worked perfectly in something about 1 hour (for the complete progress).

But the video folder(1025 files, round about 700gb) is still on "sending incremental file list" for now 8 hours. I don't think anything has been transferred. What could cause such a difference? The video folder hasn't that much more files in it. Yeah it is a lot bigger, but that shouldn't make a difference on generating the file list I think.

I'm using this rsync command:

/shares/extern # rsync -avPc --stats /shares/Public/Shared\ Videos /shares/extern/

I now since i am working on a NAS, I haven't that much cpu power, but it's far too long I think.

What do you think, is this behaviour normal? Are there any suggests what i can do to speed the whole thing a bit up?

I'm using rsync 3.0.2

1
  • 2
    Please don't put answers in the question body. You can add an answer of your own if no current answers are correct or comment on other people's answers if you have something to add. Thanks!
    – Caleb
    Aug 4, 2011 at 11:35

1 Answer 1

30

The -c option forces rsync to calculate a checksum for all files. This means that it is reading the contents of all the video files before it starts deciding which ones to copy. That is obviously slow.

Consider removing that option if possible. You only need it in rare cases. See the description on the manual page for further details:

Note that rsync always verifies that each transferred file was correctly reconstructed on the receiving side by checking a whole-file checksum that is generated as the file is transferred, but that automatic after-the-transfer verification has nothing to do with this option’s before-the-transfer "Does this file need to be updated?" check.

7
  • oh thanks for the hint. after reading the manpage, i can say, that i've missunderstood the -c option. Thought it checks after copying with a checksum. Thanks for the help!
    – Simon Lenz
    Aug 4, 2011 at 11:28
  • @CaptnLenz, happy to help. Please consider clicking the tick on the left side of my answer to accept my solution.
    – snap
    Aug 4, 2011 at 11:36
  • I had this issue because I passed '-archive' rather than '--archive' to the rsync command. rsync considered '-archive' to be a variant of -c.
    – Leo
    Dec 4, 2014 at 19:51
  • 5
    Just to expand @Leons comment, -archive is being seen as -a -r -c -h -i -v -e, all valid switches. Tricky little error.
    – Mark C
    Feb 17, 2015 at 13:12
  • Wait, what is the difference between checking the checksum versus checking the file size/modify date? Does checking the checksum actually take that much longer than checking just the file size/modify date? Does rsync save checksums after the first run or does it calculate them all from scratch every single run?
    – Ken
    Aug 7, 2017 at 17:42

You must log in to answer this question.

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