<!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/13/2011 06:14 PM, Wayne Davison wrote:
<blockquote
cite="mid:AANLkTikDeapZ1P-nJHDXPmkcrhSDhN7w-pHcX8wupTnM@mail.gmail.com"
type="cite">
<div class="gmail_quote">On Thu, Jan 13, 2011 at 10:24 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"> This patch allows one
to repeat the '-x' option a third time to stop rsync from
traversing potentially cyclic bind mounts that are on the
same filesystem.</div>
</blockquote>
<div><br>
</div>
<div>See the support/mnt-excl script for one way exclude all
mounts (including bind mounts) from an rsync. The script also
recommends an awk command piped into an absolute-anchored
exclude, but does get some of the details wrong. Here's a
better explanation:</div>
<div><br>
</div>
<div>
<div>awk '{print $2}' /proc/mounts | rsync -avf 'merge,/- -'
/dir host:/dest/</div>
</div>
<div><br>
</div>
</div>
The above will get a list of all mount points on the system and
use it as an exclude list to prevent any mounts from being
traversed. However, what it will not do is to protect the related
mount points on the receiving side from deletion unless you happen
to be copying into an exactly-the-same path on the destination.
If you want the excluded directories to be protected on the
receiving side, you're better off using the mnt-excl script (which
tweaks the excludes to be relative to the transfer).<br
clear="all">
<br>
..wayne..<br>
</blockquote>
I'm really just trying to make things easier on everybody; i.e.
avoid having to use scripts to do simple things. It seems like
adding some sort of a flag to get this functionality would benefit
everyone more than pointing them to an awk script that may or may
not be readily available/usable.<br>
<br>
Either that, or we should fix the '-x' flag so that it actually does
what it purports to do -- stay on *one* file system. Conceptually,
I would not consider a bind mount the "same" file system, especially
wrt backups.<br>
<br>
-Jeff<br>
<br>
<div class="moz-signature">-- <br>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<strong><b><font size="3" face="Times New Roman"><span
style="font-size: 12pt;"></span></font></b></strong>
<i><font size="2" face="Arial"><span style="font-size: 10pt;
font-family: Arial; font-style: italic;"></span></font></i><em><i><font
size="2" face="Arial"><span style="font-size: 10pt;
font-family: Arial;">Jeff Hansen<br>
</span></font></i></em><em><i><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">Card Access,
Inc.</span></font></i></em>
<br>
<em><i><font size="2" face="Arial"><span style="font-size: 10pt;
font-family: Arial;">11778 So. Election Rd., Ste. 260</span></font></i></em>
<br>
<em><i><font size="2" face="Arial"><span style="font-size: 10pt;
font-family: Arial;">Salt Lake City, UT 84020</span></font></i></em>
<br>
<font size="2" face="Arial"><span style="font-size: 10pt;
font-family: Arial;"><a
href="mailto:JHansen@CardAccess-inc.com"><em><i><font
color="black" face="Arial"><span style="font-family:
Arial; color: windowtext; text-decoration: none;">JHansen@CardAccess-inc.com</span></font></i></em></a></span></font>
<br>
<em><i><font size="2" face="Arial"><span style="font-size: 10pt;
font-family: Arial;"><a
href="http://www.cardaccess-inc.com/"><font size="3"
face="Times New Roman"><span style="font-size: 12pt;
font-family: "Times New Roman";">www.CardAccess-inc.com</span></font></a></span></font></i></em>
<br>
<em><i><font size="2" face="Arial"><span style="font-size: 10pt;
font-family: Arial;">801-748-4900 ext 26
(Office)</span></font></i></em>
<br>
<em><i><font size="2" face="Arial"><span style="font-size: 10pt;
font-family: Arial;">801-748-4901 (fax)</span></font></i></em><br>
<br>
</div>
</body>
</html>