Partial transferred files useless at resume, compare-dir can help ?

Adrian Cooke cooke at sun.ac.za
Wed Jun 14 11:31:31 GMT 2006



Constantin Teodorescu wrote:
> Matt McCutchen wrote:
>> On Wed, 2006-06-14 at 00:21 +0300, Constantin Teodorescu wrote:
>>  
>>> This is EXACTLY what I wanted , and tried for the first time , like 
>>> in the manual  but no ... it's behaviour is not changed at all ! :-(
>>>     
>>
>> I tested --partial-dir on my computer, and when I kill rsync manually by
>> pressing Ctrl-C, the behavior is as I said.
>>
>> Rsync needs to be aware that the connection has dropped in order to
>> clean up after itself and store the partial file.  Maybe it is waiting
>> forever to read data from the connection.  If so, you might be able to
>> fix the problem by passing a --timeout. 
> THAT'S THE RIGHT SOLUTION !!!!!!
> Now it works also for me in case that the connection is broken !!!!!
> 
> In order to be useful , --partial-dir and --partial MUST BE used with 
> --timeout
> 
> I think that this should be also mentioned in the man pages, after all.
> 
> Thanks for your help !
> Best regards,
> 
> 
> Teo
> 
Hey, I saw the same behaviour here. The solution that is given using the 
timeout works. Another solution is to kill the rsync server on the 
receiver nicely (using some sort of monitoring script) which seems to 
work if a timeout cant be used.

There is a possible catch if what I have observed is interpreted correctly.

I am running rsync on a slow embedded processor. So if the link dies 
halfway through the transmission of a large file then the file is stored 
in the partial directory.

When continuing with the transmission of the file it takes a long time 
for the embedded machine to calculate what still needs to be 
transmitted. This causes the link to timeout when it shouldn't because 
nothing is being transmitted over the link, as observed by a network 
sniffer. So the timeout has to be chosen carefully to make sure that it 
does not timeout too quickly for this computation or to long so that the 
link is used efficiently.

Thanks for making me aware to this problem!!

Adrian



More information about the rsync mailing list