[Bug 13991] rsync --delete --one-file-system skips deletes after crossing filesystems on destination.

samba-bugs at samba.org samba-bugs at samba.org
Sat Jun 13 00:54:01 UTC 2020


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

Wayne Davison <wayne at opencoder.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Wayne Davison <wayne at opencoder.net> ---
Yeah, the behavior when recursing back up out of a mount dir into a dir that is
a part of a prior top-dir's tree is not handled right at all.  Your attached
test case was a nice help for testing that (though I just used bind mounts from
dirs under /dev/shm instead of creating LVM mounts).

I added some code to the delete_in_dir() function to make it keep track of the
device values properly and committed it to git.

As for the initial report, the -x option is documented as halting deletions
under a mounted dir on the receiving side, so that is how it is supposed to
work.  If you want a different behavior you have several options:

You might be able to use --no-x -M-x (on a pull) or -x -M-no-x (on a push) if
you want -x on just the sending side. However, I have not tried that (and a
local copy would need some kind of remote-shell usage so that the 2 sides can a
different options, which the support/lsh script is useful in supporting).

A better approach might be to parse the contents of /proc/mounts and turn mount
points into filter rules. You then have full control over which dirs you want
to exclude, hide, or protect with no guessing.  You can even put rules into
per-dir filter files if the client and sender side need different rules (and
one side may not know what the other side needs).

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


More information about the rsync mailing list