Hi,
On Wed, 19 Jan 2005, Danny Sauer wrote:
Wayne wrote regarding 'Re: excluding based on filesystem?' on Wed, Jan 19 at 15:26:On Wed, Jan 19, 2005 at 10:44:42AM -0600, Danny Sauer wrote:
So, what I'm looking for is possibly a way to make excludes relative to the root at the beginning of the operation - so that if I specify "rsync --exclude /dev host:/ /backup/host", only /dev on host is excluded, not /home/user/dev, etc.
That is precicely what already happens. The only way it would exclude a "dev" further down in the transfer is for you to have specified "dev" instead of "/dev" -- the leading slash anchors the exclude at the base of the transfer.
The man page says Note that, when using the --recursive (-r) option (which is implied by -a), every subcomponent of every path is visited from the top down, so include/exclude patterns get applied recursively to each subcomponent. Perhaps that should be amended to mention that this only happens when the pattern doesn't start with a '/'? :) Or maybe I should just pay more attention to the difference between transfer-base and file-base...
I can confirm from practice what Wayne said.
And, for your mind, a path starting with / is always absolute.
Here: absolute to the module base.
rsync does a "path matching", not a primitive "pattern matching", it seems...
Cheers -e -- Eberhard Moenkeberg ([EMAIL PROTECTED], [EMAIL PROTECTED]) -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html