How to exclude directories from source with --relative
Stuart Anderson
anderson at ligo.caltech.edu
Sat May 31 17:20:35 GMT 2008
On Fri, May 30, 2008 at 11:14:22AM -0700, Wayne Davison wrote:
> On Tue, May 27, 2008 at 10:43:00AM -0700, Stuart Anderson wrote:
> > Nuts. I was afraid that was going to be the answer. Unfortunately,
> > it violates the very helpful advise given above, i.e., run with "-v"
> > and add exclude rules for files you don't want to transfer based
> > on the output seen.
>
> That rule is not violated (the matching is correct), it is just that you
> can't try to exclude something in the middle of a relative path that
> you've specified.
>
> You can work around the issue by moving higher in the directory
> structure and using includes/excludes. For example, instead of:
Wayne,
Many thanks for you help on this. I now have something working
by giving up on the --relative option and adding a longer list of alternating
include/exclude rules. However, I would like to request that you consider
increasing the scope of the filtering rules to include relative paths.
I would like to be able to use shell globing to generate a long list
of source directories but still allow rsync to filter out some of those.
Put another way, I would like be able to specify "--exclude abc/"
and have the directory "abc" not be transferred under any circumstances
unless it was first listed in an --include argument.
P.S. The recent scalability and incremental scan improvements in 3.0 are
working great for me, and are greatly appreciated.
Thanks.
--
Stuart Anderson anderson at ligo.caltech.edu
http://www.ligo.caltech.edu/~anderson
More information about the rsync
mailing list