It seems that rsync save a temporary file at local when I sync a big file on remote.

Then the machine encounter a abrupt shut down for power off.

After I start the machine again, it seems that rsync syn the big file from begin, but I found that there is one file already synced about 60%(1G), what's wrong of my rsync usage?

command I used:

rsync --partial -av -r --progress user@remote /local-dir

As Tim said, this sounds normal; rsync will know that it's got a file that seems to be a partial copy of the remote file, but it still has to check that the file it has is in fact the file you're copying from.

As it's doing this check, it will show the number of bytes of the file it has "transferred", so it will look as though it's copying the file again - but if you look at the speed of the transfer, it should be much faster than would be possible across the network. Eventually rsync will get past the bytes it's already copied and find new bytes that need to be transferred across the network, and then you'll see the speed slow down.

In short, I think you're being confused by rsync's output, as it doesn't differentiate between "bytes transferred across the network" and "bytes transferred simply by checking that the local copy matches the remote copy"


This is normal. rsync should be going back through the files it's already transferred to check for updates.

The -u flag causes rsync to look at file modification times; if you add this it should skip the files that haven't changed on the source.

  • I know what you mean, rsync will use some kind of diff way to compare local file and remote file. But my question is a little different, the temporary file (the file to rsync is very large, so rysnc save it local as tmp first first) is not continued by next rsync(restarted for power cut down). Maybe this is a bug for rsync, but I am not sure.
    – Sam Liao
    Dec 7 '09 at 2:30

Just rename the temp file (.somethingXYZ) to the correct filename (something) from the remote source.

Then rsync will DEFINITELY only download the missing stuff.

(If you watch the folder when running rsync, you will see a new .somethingABC file being generated, which will grow by tens of MB/second... because rsync will be reading from the "half-done" local file instead of downloading it again from the remote source over the network).


You can force rsync to checksum the file and only copy remaining data with the following command.

rsync -av --progress --checksum --inplace --no-whole-file SOURCE DESTINATION

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.