Re: Problem with file exclusion pattern

Wayne Davison via rsync <[email protected]>
Newsgroups gmane.network.rsync.general
Message-ID <CAHSx_SuaoUP2eBWLaHCKc9b1rnTx8LrfVK8JZoVPbLjbJUyOqQ@mail.gmail.com>
On Sat, Apr 30, 2022 at 3:33 PM H wrote:

> rsync -vHrltDium -c --chmod=Du+rwx,go-rwx,Fu+rw,go-rw --no-perms --stats
> --include='*' --include='*/' --exclude='*.~lock*' --exclude='*' -e "ssh -y
> -p 22" ~/test/ [email protected]:~/test
>

See the latest manpage's filter-rules section
<https://download.samba.org/pub/rsync/rsync.1#FILTER_RULES> an easy way to
debug where filtering is going wrong. Doing that would show you that
everything in your transfer is being matched by the first include option
you used.  This is because (as the 2nd paragraph in the filter section
explains) the first matching pattern is acted upon. A good general rule of
thumb is to move more specific rules prior to more general rules.  However,
in your command above, you only need the one lock-excluding option (since
the default is to include anything that doesn't match any of your rules)
and not any of the other include/exclude options.

..wayne..

-- 
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.