6

As a total newbie, after reading tons of questions in SO and the documentation repetitively several times, I came up with this solution:

rsync -Pavuh --append-verify source destination

Where --append-verify flag implies --inplace flag and --inplace flag implies --partial and I only put the -P flag there because I am lazy to write --progress separately.

Yet, when I issue this command, and Ctrl+C it in the middle of a big file, and then re-issue it, after it finishes I see that that big file is left where I cut it off.

The right behaviour should be as per documentation to leave the partially transferred file as-is on cancellation according to the --partial flag (which is done) and then continue to append to it on the second trial according to the --append-verify flag.

How can I make rsync resume from where it was interrupted?

3

The problem is probably the -u flag. Since the partially transferred file has a newer timestamp it just skips it.

In theory, the -t option should ensure that this does not happen, but my hypothesis is that some (all?) kinds of interruption can leave the partial file with a newer datestamp. I've not tested this.

I don't see any other option there that has any variation on the "skip some files" theme, so it's my best guess.

| improve this answer | |
  • From the documentation: --update: This forces rsync to skip any files which exist on the destination and have a modified time that is newer than the source file. (If an existing destination file has a modification time equal to the source file's, it will be updated if the sizes are different.) So, it should check the file sizes. – duru Mar 9 '16 at 14:23
  • @duru See edit. – ams Mar 9 '16 at 17:03

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.