[Bug 11866] New: rsync fails (failed to re-stat) when using double fuzzy + link-dest on renamed files

samba-bugs at samba.org samba-bugs at samba.org
Thu Apr 21 06:54:23 UTC 2016


https://bugzilla.samba.org/show_bug.cgi?id=11866

            Bug ID: 11866
           Summary: rsync fails (failed to re-stat) when using double
                    fuzzy + link-dest on renamed files
           Product: rsync
           Version: 3.1.1
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: core
          Assignee: wayned at samba.org
          Reporter: mj at doze.net
        QA Contact: rsync-qa at samba.org

When using rsync with --fuzzy --fuzzy (double fuzzy) and --link-dest, rsync
fails if a file was renamed to a new name on the source that does not exist in
the link-dest.  As an example:

mj at backup-server:~/foo$ rm -rf .sync && mkdir .sync && rsync -azSHAXxrsyy
--ignore-existing --fake-super --link-dest=/home/mj/foo/current
--files-from=:/home/mj/files-to-backup root at backup-client:/ .sync
rsync: failed to re-stat "/home/mj/foo/.sync/etc/motd.old": No such file or
directory (2)
rsync: failed to re-stat "/home/mj/foo/.sync/var/log/alternatives.log.1": No
such file or directory (2)
rsync: failed to re-stat "/home/mj/foo/.sync/var/log/auth.log.3.gz": No such
file or directory (2)
rsync: failed to re-stat "/home/mj/foo/.sync/var/log/daemon.log.3.gz": No such
file or directory (2)
rsync: failed to re-stat "/home/mj/foo/.sync/var/log/dpkg.log.1": No such file
or directory (2)
rsync: failed to re-stat "/home/mj/foo/.sync/var/log/messages.3.gz": No such
file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code
23) at main.c(1655) [generator=3.1.1]

In each case above, the files which rsync failed to re-stat were ones that
existed in the link-dest (/home/mj/foo/current) but under a different name. 
For instance:

mj at backup-server:~/foo$ ls -al /home/mj/foo/current/etc/motd*
-rw-r--r-- 7 mj mj 286 Dec 24  2014 /home/mj/foo/current/etc/motd

root at backup-client:/etc# ls -al motd*
-rw-r--r-- 1 root root 314 Apr 21 06:32 motd
-rw-r--r-- 1 root root 286 Apr 21 06:33 motd.bak
-rw-r--r-- 1 root root 286 Dec 24  2014 motd.old

Note that, in this case, rsync didn't fail on motd.bak, just motd.old.  Both
contain the same content, but only motd.old has a matching timestamp.

I can completely reproduce this problem on multiple machine pairs and with
different file sets.  The problem is resolved by removing the double-fuzzy
configuration but, of course, that impairs performance.

All rsync binaries involved are version 3.1.1 (debian 3.1.1-3_amd64).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.



More information about the rsync mailing list