[Bug 7903] Cannot complete sync

samba-bugs at samba.org samba-bugs at samba.org
Sat Jun 4 10:21:25 MDT 2011


--- Comment #2 from Wayne Davison <wayned at samba.org> 2011-06-04 16:21:24 UTC ---
Rsync doesn't support a reconnect because the protocol is stateful, and
currently only supports starting the transfer from the beginning again (which
can be done by the caller).

What you need to strace is the other side of the connection.  If both sides are
getting a broken connection error, then the connection went down and there is
nothing rsync can do about it.  If there was some kind of error on the other
side, then you can attempt to resolve that error (so that the remote rsync
doesn't go away).  See http://rsync.samba.org/issues.html and the rsync-debug
script for a possible way to strace the remote side.

Finally, if your connection is just flaking out, you can try dividing up the
mirroring task into smaller chunks that can be sent by a series of rsync tasks.
 One extreme example (that is probably overkill) would be to rsync just a
single directory at a time by using -d instead of -r and still using --delete:

use strict;
my $SRC = '/tmp/src'; # set to '/volume'
my $DEST = '/tmp/dest'; # set to 'user at host.org:/path/...'
chdir $SRC or die "Unable to chdir to $SRC: $!";
$/ = "\0";
open PIPE, '-|', qw( find . -type d -print0 ) or die $!;
while (<PIPE>) {
    if (system qw( rsync -aidR --no-r --del ), "$_/", $DEST) {
        warn "Got error from rsync for directory $_\n";
close PIPE;

Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the rsync mailing list