<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 01/18/2011 05:45 PM, Wayne Davison wrote:
<blockquote
cite="mid:AANLkTimgJDSZ-AoNq+Djc1mFk1RuPoXO7NnFbj7ckGa8@mail.gmail.com"
type="cite">
<div class="gmail_quote">On Tue, Jan 18, 2011 at 11:27 AM, Jeff
Hansen <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:jhansen@cardaccess-inc.com">jhansen@cardaccess-inc.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
<div class="im">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.</div>
</div>
</blockquote>
<div><br>
</div>
<div>You patch just prevents recursing into subdirectories of
the directories mentioned as command-line args...</div>
<br>
</div>
</blockquote>
Exactly. Which is the purpose of the '-x' flag to begin with: rsync
an entire filesystem without forcing the user to worry about
manually excluding satellite filesystems. With -x, I can do an
"rsync -avx / host:/backup" and automatically exclude any non-rootfs
mounted filesystems, permanent or temporary, from my backup. -x
works wonderfully in that regard, and makes my life easier (and I'm
sure there are others that use it besides myself), except in the
case of the bind mount.<br>
<br>
All this patch does is carry the essence of the -x option one step
further: to exclude bind mounts (and other potentially similar
mounts) that -- to myself -- are not conceptually part of the "one"
file system to begin with. This patch non-invasively fixes what I
consider to be a hole in the original -x implementation.<br>
<br>
Basically, it feels like you are telling me that I shouldn't be
using -x at all, which I doubt would be very popular, as I'm sure
there are many that use it.<br>
<br>
<blockquote
cite="mid:AANLkTimgJDSZ-AoNq+Djc1mFk1RuPoXO7NnFbj7ckGa8@mail.gmail.com"
type="cite">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.
<div><br>
</div>
</blockquote>
The way rsync determines if the directory is a mount point looks
very portable to me (with the FLAG_TOP_DIR bit), and with this
patch, it has worked on every Linux system I've tried so far (not
sure if FLAG_TOP_DIR works on BSDs, but I'm guessing it does).<br>
<br>
-Jeff<br>
<br>
</body>
</html>