The Samba-Bugzilla – Bug 7123
Use both old dest file and partial file as basis data
Last modified: 2011-02-21 21:30:37 UTC
From http://lists.samba.org/archive/rsync/2009-December/024382.html :
Currently, a file transfer can use only basis file: the old destination file, the file in the partial dir, or an alternate basis from somewhere. This makes it difficult to complete the delta-transfer of a large file if rsync keeps getting interrupted and has to be restarted. If rsync transfers some literal data (setting cleanup_got_literal) and is then interrupted, the partial file will be kept, and the next run will not have the benefit of the later data in the old destination file as basis data.
At a minimum, rsync should use both the old destination file and the partial file as basis data. In some circumstances it might be beneficial to keep multiple partial files rather than replacing the previous one, but I'm not sure whether this is common enough to be worth implementing.
May I suggest using a state file?
Re comment #1: I don't understand what you are proposing. Please give some more details.
*** Bug 7922 has been marked as a duplicate of this bug. ***
Is there a plan to fix this?
Created attachment 6260 [details]
i don't know what a "patch" is, but i changed this source code file and recompiled. seems to work.
it could be done better - it could append directly to the partial file, instead of creating the temporary merge file, then replacing the partial file.
seems to work tho.
let me know your thoughts.
Created attachment 6261 [details]
A patch version taken from the generator.c "fix" attachment