Once again I find myself in the throws of a major pain in the butt
figuring out how to exclude the files under directories or at least
the directories and the files.

Apparently I don't use rsync in enough different circumstance for this
to become routine.

Every single time I want to use rsync for anytning more complex than
the simplest on disk transfers.  I land smack dab in a large hair
pulling session about exclude rules.

Currently trying to download the debian distro for my architecture.

The setup under directory `woody/main/' looks like:

drwxrwxr-x        4096 2000/12/18 09:40:43 .
drwxrwxr-x        4096 2000/01/16 04:17:17 binary-all
drwxrwxr-x        4096 2001/04/04 12:20:08 binary-alpha
drwxrwxr-x        4096 2001/04/04 12:20:53 binary-arm
drwxrwxr-x        4096 2001/04/04 12:22:42 binary-i386
drwxrwxr-x        4096 2001/04/04 12:24:09 binary-m68k
drwxrwxr-x        4096 2001/04/04 12:25:32 binary-powerpc
drwxrwxr-x        4096 2001/04/04 12:26:46 binary-sparc
drwxrwxr-x        4096 2000/01/16 04:28:31 disks-alpha
drwxrwxr-x        4096 2000/02/07 05:19:17 disks-i386
drwxrwxr-x        4096 2000/03/10 12:03:13 disks-m68k
drwxrwxr-x        4096 2000/03/10 12:03:44 disks-powerpc
drwxrwxr-x        4096 2000/01/16 04:20:23 disks-sparc
drwxrwxr-x        4096 2001/04/04 12:27:41 source

I want only  binary-all/ binary-i386/ and disks-i386

My command line looks like:
rsync -navvz  --exclude-from=rsync_woody_exclude 
rsync://ftp.debian.org/debian/dists/woody/ .

I'm trying for a dryrun to see how my exclude rules work

cat rsync_woody_exclude
binary-alpha/*
binary-arm/*
binary-m68k/*
binary-powerpc/*
binary-spark/*
disks-alpha/*
disks-m68k/*
disks-powerpc/*
disks-sparc/*
source/*

But still every damn file on the server turns up in the output,
including every thing under the ones supposedly excluded.

Also trying with a leading forward slash -- same results.

The man page says, well .... point blank really, that this will work.

       o      if the pattern ends with a  /  then  it  will  only
              match a directory, not a file, link or device.

       o      if  the  pattern contains a wildcard character from
              the set *?[ then  expression  matching  is  applied
              using  the shell filename matching rules. Otherwise
              a simple string match is used.

What make this such a gripe is that every single time, a new setup has
to be jerked with.  

That -n flag should allow me to find out what is going to happen.
This is not a place where you want to have it wrong.  It would involve
thousands of files.

Reply via email to