rsync exclude/include [FIDUCIA virengeprüft - ohne Gewähr, daß alle bekannten Viren und deren Varianten erkannt wurden.]
dwd at bell-labs.com
Wed Nov 14 03:00:59 EST 2001
On Tue, Nov 13, 2001 at 01:44:45AM +0100, Thomas Schweikle wrote:
> Hi again!
> Tomasz Ciolek <tmc at goldweb.com.au> on 13.11.2001 01:21:27
> An: Thomas Schweikle <tschweikle at fiducia.de>
> Thema: Re: rsync exclude/include [FIDUCIA virengeprüft - ohne Gewähr,
> daß alle bekannten Viren und deren Varianten erkannt wurden.]
> > Try dumoping the whole file list into a text file, prefix each one with
> > minus for exclude and a + for include.
> > Then run rsync like this:
> > rsync -avz --exclude-from="exclude.list"
> ftp3.sourceforge.net::/netbsd/iso/ ./iso/
> > have a look at the rsync man page for more information on
> > the exact syntax of the unified include/exclude stuff
> > Regards.
> Done that. Result: rsync include/exclude matching is definitively wrong. If
> "... matching is done using shell filename matching ..." this file should
> - /*
> + /iso/1.5.*/i386*
> but doesn't. Looks like "*" is matched, but does not lead to a "true"
> matched against "/iso/1.5.1/i386cd.iso".
Here's what you neeed:
In order to understand why you need to realize that the rsync algorithm
recurses down into each directory and applies each pattern in order and
stops when it finds a match, so if you don't explicitly include the parent
directories they get excluded by the exclude wildcard and rsync never
descends down into the directory. Note that "/*" only excludes things at
the top level, that's why I had to explicitly exclude things at the next
two levels too. A simplification is this:
because if you don't have the slash preceding the exclude "*" it applies at
> Any way to debug this, making sure how matches are really done?
The most recent snapshots of the development version of rsync will give you
more helpful information if you use -vv, but it's not yet in any released
version. The patch is at
- Dave Dykstra
More information about the rsync