David Bolen wrote:

> > That still doesn't work. Now I've even entered:
> > [ test ]
> >   comment        = RSync test
> >   path           = /teeusr/teeisc/scratch/rsync_test/repository
> >   include        = /bla1          \
> >                    /foo1/bar3      \
> >                    /foo1/bar3/*    \
> >                    /foo1/bar3/**   \
> >                    /foo2/
> >   exclude        = /*
> >
> > ..but I still get only bla1 and foo2. I don't quite understand why
> > it's sufficient to specify /foo2/ to get all files and subdirs of foo2
> > but a /foo1/bar3/ does not work to get all dirs and files from
> > there. Is this somehow related to my exclude line?
>
> Most likely.  Rsync's include/exclude algorithm works at each level of
> the tree, and it's fairly easy to accidentally exclude a higher level
> of the tree without realizing it.
>
> I believe that in this case your problem is that while you've included
> /foo1/bar3/ (and all directories beneath it), your global exclude has
> excluded the top level /foo1 directory.
>
> For cases where you only want a sub-root, you also need to include the
> intermediate directories along the path to that sub-root if you're
> going to use a global exclude.
>
> You can try running with a few -v options (I think -vv may be enough)
> to get a glimpse into how rsync is making include/exclude selections.

The problem is that rsync doesn't output which rule causes an include or
exclude. Even four 'v's don't do the job.


> What happens if you add /foo1/ as a separate line on your include
> list?

This is it!
Yours is the line you've got to think along. Thank you.

Cheers,
    Ingo



Reply via email to