On Thu, May 06, 2004 at 01:20:34PM -0500, Michael C. Davis wrote:
> I've narrowed it down to a test script for a representative case
> which, again, should be working but isn't.

You fell victim to one of the classic blunders!  The most famous of
which is, "Never get involved in a land war in Asia."  But only slightly
less well known is this: "Never exclude '*', when death is on the line!"
Ha ha ha ha ha!  Ha ha ha ha!  [Clunk!]

Here's a serious answer:

Always include ALL the parent dirs when excluding '*'.  Also, consider
using a less powerful trailing exclusion.  In the following example,
I've put the include and exclude rules into a single file named "excl":

% cat excl
+ /usr/
- /*
+ /usr/etc/
- /usr/*

% rsync -aHvn ... --exclude-from=excl $SRC $DEST

Or:

% cat excl
+ /usr/
+ /usr/etc/
+ /usr/etc/**
- *

Note that the last two includes in the latter example are both
necessary, as the last one only includes what's inside the
directory, but not the directory itself.

..wayne..
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to