I ran through this last week.  Finally got the excludes right. First be sure
that:
--exclude-from=exclude-file
references the true path and name of your exclude file
--exclude-from=/backups/yourexclude.file

I don't know if the quotes will hurt you, probably not, but in the exclude
file itself, I simply use:

/path/to/somedir/               #
/some.other.dir/                #
temp/                           #any temp dir anywhere
lost+found/                     # just because
*.bak                           # any bak file

since I'm only referencing excludes

If I wanted both include and exclude in the same file, I think this would
work
First I would exclude everything, then include just what you want

- /
+ /path/to/somedir/
+ /someotherdir/
- /path/to/somedir/             #
- temp/                         # any temp dir anywhere
- lost+found/                   # just because
- *.bak                         # any bak file


> I am trying create a mirror of a certain directory, but only copying
> certain top-level dirs.
> I am running this command:
>
> rsync -vazn --exclude-from=exclude-file /opt machine2:/opt
>
> exclude file looks like this (truncated):
>
> + "/AKmtools"
> + "/Acrobat4"
> + "/FSF*"
> + "/SUNWspro4.0"
> + "/netscape4.7"
> + "/perl5"
> - "/*"
>
> rsync still runs thru the entire directory tree when building the file
> list.
> I would expect it to descend only those directories included from the
> file!
> Is this correct behaviour, or I am specifying something incorrectly?
>


 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
  Tim Dolan
  SysAdmin / GIS Project Manager
  mailto:[EMAIL PROTECTED]
  858/481-3119 x114
 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
  THE OMEGA GROUP
   12707 High Bluff Drive
   San Diego, CA 92130
 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
  http://www.theomegagroup.com
  Customer Support: 800/228-1059
 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*


Reply via email to