I often transfer large files from a remote server using rsync with the following command :
rsync -rvhm \ --progress \ --size-only \ --stats \ --partial-dir=.rsync-partial \ "user@server::module/some_path" "some_path"
That way, even if the transfer fails, I can resume it later and I know that I'll only have complete files in
some_path on the destination, since all partial transfers will stay in
When a transfer resumes, rsync first checks the partial one to determine where exactly to resume (I guess) and I'm fine with that. The problem is that when it's done with this check, the partial file gets copied outside of the
.partial-rsync folder for resume. Therefore, I'm left with a partial transfer (that will be replaced or deleted at the next pause or when the transfer finishes) along with the ongoing one.
This is inconvenient since :
- I don't have much free space on the destination ;
- The files are quite large ;
- If the partial transfer went "far enough", I might not be able to resume it since rsync will try to copy it first and will complain that there isn't enough space available to resume ;
- There is no reason that I can think of to keep a copy of the partial file to resume the transfer : the partial file itself should be used.
Is there a way to avoid this behavior or is this by design ? And if so, why would we want it to work this way ?