an --exclude-from question

Wayne Davison wayned at samba.org
Sat Nov 1 05:06:40 EST 2003


On Fri, Oct 31, 2003 at 11:59:54AM -0500, Jason Philbrook wrote:
> Basically, I want to mirror home directory structures, and only two files
> within each home directory, to other machines from a central server. Those
> files are ~/.spamassassin/user_prefs and ~/.procmailrc.

Since the default is to include things, you need to make sure that you
exclude what you don't want sent.  The syntax for adding an include into
the exclude list is to prefix it with a "+ ", not a "+".  Also, remember
that the base of the excludes is the base directory of the transfer, so
the /home/* is useless if you're transferring dirs from inside /home.
Try something like this for mirror.home.exclude (assuming you want all
directories to be created if not yet there except for the ~/public_html
dir):

# excludes /home/USER/public_html dir from transfer:
/*/public_html/
# includes all other directories
+ */
# include the files we're interested in:
+ /*/.spamassassin/user_prefs
+ /*/.procmailrc
# exclude everything else:
*

I don't understand why you're using --delete, though--I'd suggest
removing that option.

..wayne..



More information about the rsync mailing list