<div class="gmail_quote">On Thu, Jan 13, 2011 at 10:24 AM, Jeff Hansen <span dir="ltr">&lt;<a href="mailto:jhansen@cardaccess-inc.com">jhansen@cardaccess-inc.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


  

    
  
  <div bgcolor="#ffffff" text="#000000">
    This patch allows one to repeat the &#39;-x&#39; 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&#39;s a better explanation:</div>
<div><br></div><div><div>awk &#39;{print $2}&#39; /proc/mounts | rsync -avf &#39;merge,/- -&#39; /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&#39;re better off using the mnt-excl script (which tweaks the excludes to be relative to the transfer).<br clear="all">
<br>..wayne..<br>