On 01/18/2011 05:45 PM, Wayne Davison wrote:
On Tue, Jan 18, 2011 at 11:27 AM, Jeff Hansen <[email protected] <mailto:[email protected]>> wrote: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.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...
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.
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.
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.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).
-Jeff
smime.p7s
Description: S/MIME Cryptographic Signature
-- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
