exclude option in rsyncd.conf
dwd at bell-labs.com
Tue Feb 26 04:21:55 EST 2002
On Fri, Feb 22, 2002 at 10:08:37PM -0800, Martin Pool wrote:
> On 22 Feb 2002, Albert Chin <rsync at lists.thewrittenword.com> wrote:
> > I have the following module defined in rsyncd.conf:
> > [updates]
> > list = no
> > hosts allow = foo
> > path = /ext/updates
> > exclude = incoming
> > >From host "foo", if I run:
> > $ rsync -arHvn --delete bar::foo /ext/updates
> > then the /ext/updates/*/incoming directory will be deleted. However,
> > If I use:
> > $ rsync -arHvn --delete --exclude=incoming bar::foo /ext/updates
> > then /ext/updates/*/incoming is not deleted. This is what I want.
> > According to the man page for rsyncd.conf:
> > The "exclude" option allows you to specify a space
> > separated list of patterns to add to the exclude
> > list. This is equivalent to the client specifying
> > these patterns with the --exclude option except
> > that the exclude list is not passed to the client
> > and thus only apply on the server.
> > Does the last part of the last sentence infer the deletion behavior
> > above?
Yes, and it is deliberate.
> What if you use --delete-excluded?
Since he does does not want the excluded files deleted, he definitely
doesn't want that option.
> This is kind of inconsistent, but I guess it can be explained as the
> server trying to hide from the client the fact that those directories
> exist at all.
Yes. While I was maintaining rsync, back in Feb/March 1999, somebody
submitted a patch to send the exclude patterns from the server to the
client and I almost accepted it but then I decided it was feature to
totally hide the files from the client. If you want to share a complicated
exclude list with the client and server, you can put it into a file and use
"exclude from =" on the server and --exclude-from on the client and send it
from one side to the other with rsync.
More information about the rsync