Occasional but consistent trouble with --filter

Wayne Davison wayned at samba.org
Fri Jan 1 16:30:47 MST 2010

On Fri, Jan 1, 2010 at 7:46 AM, Giampaolo Tomassoni <Giampaolo at tomassoni.biz
> wrote:

> '--filter=-!r /srv/vhome/*/users/*/.mail/' user at oldserver:/srv/vhome /srv/

See the manpage discussion of anchoring at the top-level of the transfer for
why your filter rule should not have a "/srv" prefix.  The 'r' modifier
makes the rule only apply on the receiving side, which means you're
specifying a protect rule to prevent removal of files, but does not stop the
files from being copied.  The '!' modifier negates the match, which makes it
protect everything from deletion except .mail dirs (though, since its
anchored wrong, it would seem to protect everything from deletion).

Perhaps you wanted to specify --filter='- /vhome/*/users/*/.mail/'  (for
both excluding and deleting of that dir)?  If not -- if you're really trying
to copy just hte .mail dirs, you have a lot more things to change.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20100101/bbaa3706/attachment.html>

More information about the rsync mailing list