Resuming from partial downloads but keeping complete file

Carlos Carvalho carlos at fisica.ufpr.br
Mon Jun 1 13:12:39 GMT 2009


Ante Blaskovic (anblasko at globalnet.hr) wrote on 1 June 2009 12:31:
 >I have very-large file to transfer 10 GB and I have problems to transfer it
 >if connection drops often.
 >
 >When I don't use --partial option, It will compare file with version on
 >server and transfer difference but what if it only comes to 99% and
 >connection drops. I will lost that 99% part and will need to start again.
 >
 >When I use --partial option when transfer is interrupted full version of
 >file in servers folder is replaced with partial version of file.  This
 >becomes problem if transfer is interrupted in beginning, I will stuck with
 >file of for example 1GB or less and next rsync will need to transfer the
 >other part which is now 9GB because my server version of file is only 1GB
 >now.
 >
 >Does anyone knows solution for this ?
 >
 >It would be good that partial version of file is kept on server and that
 >transfer is resumed from that point. Server version should not be
 >overwritten until partial download reaches 100%.

You could use --partial-dir (preferably with a relative path-name).
rsync will keep updated files in a directory with the given name
inside each directory, and replace the files when their transfer is
finished. If it's interrupted the partial directory will remain and
rsync will use its contents to speed up the next update. The same is
done by --delay-updates; the difference is that --delay-updates does
all the replacements at the end of the run in rapid succession.

There's a history of bugs with these options, so it'd be better to use
a recent version of rsync.


More information about the rsync mailing list