exclude-from and include-from confusion

Dave.Turner at VerizonWireless.com Dave.Turner at VerizonWireless.com
Wed Apr 21 20:51:57 GMT 2004


Learning rsync (love it) and am requesting some help in understanding the
exclude-from/include-from rules. I've been doing some testing and the
results aren't coming out as I expected.

Problem:
I have a directory with several dozen sub directories and would like to
selectively pick a couple dozen directories to remotely copy. The issue is
that there are a large number of directories and I want to keep the conf
file and exclude/include files as simple and efficient as possible. I'm
using /export/home/jetson as my home dir for this test.

My Understanding:
- Only one directory can be listed in the PATH module option.
- Any directory or file listed in the exclude file will NOT be copied.
- Any directory of file listed in the include file WILL be copied no matter
what is in the exclude file.
	(thus allowing me to exclude *.zip files while including davet.zip.)
- I realize I could create additional modules, however, I'd like to avoid
creating a dozen modules, possibly with different exclude/include files.

My Confusion:
Using the exclude and include combo below, I thought I would be able to list
just the directories I want to copy and thus avoid having large and
confusing lists. However, the result is the the testdir/ directory and it's
subdirectories are still ignored. What am I missing? Is my syntax wrong for
the exclude/include files?

Command line:
/usr/local/bin/rsync -av --exclude-from=/davet/rsync.exclude
--include-from=/davet/rsync.include --stats jetson at primey::jetson
/export/home/jetson

Module:
[jetson]
        path = /export/home/jetson/
        read only = yes
        list = yes

Exclude File:
*

Include File:
/export/home/jetson/testdir/*


Thanks,
Dave


More information about the rsync mailing list