[PATCH] One more -x to not traverse cyclic bind-mounts
Wayne Davison
wayned at samba.org
Tue Jan 18 17:45:51 MST 2011
On Tue, Jan 18, 2011 at 11:27 AM, Jeff Hansen <jhansen at cardaccess-inc.com>wrote:
> I hate to beat an (apparently) dead horse, but I've tested this patch on
> several systems and I would really appreciate it if this patch (or some
> variation of it) went into mainline.
>
You patch just prevents recursing into subdirectories of the directories
mentioned as command-line args, which can be accomplished several different
ways, including an exclude:
rsync -aiv --exclude='/*/*/*' src1 src2 /dest/
as well as using -d with --no-r as long as the source dirs have a trailing
slash. For instance:
rsync -aivd --no-r src/ /dest/src/
or a multiple source dir example of -d --no-r combined with -R:
rsync -aivdR --no-r src1/ src2/ /path/./something/deeper/ /dest/
See also --files-from (which is essentially the same as the -d --no-R
examples, with trailing slashes needed on the dirs mentioned in the input
file that should include their contents).
I can think of no nice, portable way to discover bind mounts, so I'll leave
it up to the user to tell rsync which dirs to elide.
..wayne..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20110118/419ed409/attachment.html>
More information about the rsync
mailing list