Help with complicated heirarchy exclude syntax

reader at newsguy.com reader at newsguy.com
Sat Dec 22 23:02:10 GMT 2007


Matt McCutchen <matt at mattmccutchen.net> writes:

> To get the rules to apply only in ~/News, anchor the patterns and use
> the ** syntax to match anything below ~/News.  The patterns are matched
> against files' full paths from ~, but the first pattern accepts a
> non-numeric character only in the basename because the final * cannot
> match slashes.
>
> --include='/News/**[!0-9]*' --exclude='/News/**'

Haa... what I took to be a horribly complicated matter... barely even
conceivable by mortal men, turned out to be pretty simple in the hands
of someone who knows what they are doing. :)

One further aspect of this that would be nice to solve too, is that
using that technique in this case means that rsync has to check
something like 550,000 (literally) messages to get thru a sync.

That number will dwindle to a fraction of that eventually but it will
be a while, and of course I need dayly backups of the other stuff. 

My test run has been running since I read mail reply.. probably 15
minutes so far.

I'm guessing there isn't much of any way around that... and just have
schedule the backups accordingly.



More information about the rsync mailing list