Rsync --delay-updates takes a long time

Eric Horne eric at box11.org
Sat Jul 8 15:07:43 GMT 2006


Hi. I'm running rsync 2.6.8 at two sites with --partial/--partial-dir 
and --delay-updates enabled.

It seems that once the transfer is complete, --delay-updates takes a 
really long time to copy data. From strace output, it looks like it is 
actually re-reading the data out of the .rsync-partial directory for 
each file and then re-writing it back into the correct directory. I 
would have expected a simple (and faster) mv type operation instead.

The problem is, our rsync server is not our data storage -- data storage 
in this particular case is an Solaris box where we are not allowed (!) 
to run rsync. Rsync server and client are both Linux EL3. The time it 
takes to "finish up" is sometimes in excess of 30 minutes.I think its 
extra slow because it first reads the files (over the net), then writes 
them (back to the net). This ultimately exceeds our timeout value (30 
minutes), and causes the client to exit.... which causes problems with 
our failure-mode handling (apparently the server doesn't exit, it 
continues copying files, and then we start another rsync which gets two 
rsyncs dueling to copy files out of .rsync-partial. One of them 
eventually gets confused when the other removes a file from underneath 
it). Anyway, that's my theory

So.. am I correctly reading the methodology used by rsync for 
--delay-updates, and if so, is there any possibility of adding a switch 
to force a mv type operation for files that reside on the same partition 
(which is usually the case anyway).

BTW, I thought about using a temporary directory; but the problem with 
that is we have several rsync operations inbound to this server; each 
session would need it's own temporary directory because we are 
replicating folders with similar filenames, different data.. but -T 
doesn't create a directory if it doesn't exist on the server, so we 
can't specify a unique temporary space for each session. Another feature 
request, perhaps? :) I wonder if we could use a pre-xfer script to 
automatically create a unique temporary directory.. hmm, any thoughts on 
the feasibility of doing that?

-Eric


More information about the rsync mailing list