9

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?

1 Answer 1

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.

2
  • 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, 2016 at 14:23
  • @duru See edit.
    – ams
    Mar 9, 2016 at 17:03

You must log in to answer this question.

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