>>>>> On Wed, 7 Feb 2007 12:18:09 +0100, Stephan Ebelt said:
> 
> Hello,
> 
> On Tuesday 06 February 2007 20:28, Martin Simmons wrote:
> > >   regexdir = "/home/.*/[^Movies|^Music|^Pictures]/.*"
> > >
> > > (though, this doesnt work yet)
> >
> > No, you can't use [] like that in a regexp -- it is for matching single
> > characters, not strings.  There is no "not" operator in regexps.
> 
> there is. Ie this works
> 
>       egrep "/home/.*/[^Pictures]" pathlist.file
> 
> the only problem is it would also _not_ match /home/user/iPctures because of 
> the nature of []... I have not tried this with bregex because I prefer your 
> solution below.

Right, and /home/user/Plausible, /home/user/impossible etc.  Anything
beginning with P, i, c, etc will behave the same, which is almost certainly
not wanted.


> > > Somehow I am stuck here. Can someone see a more simple approach to get
> > > _only_ those three directories from each home in the system? Or do I have
> > > to write a script?
> >
> > This does most of what you want:
> >
> > FileSet {
> >   Name = "data-users-media"
> >
> >   Include {
> >
> >       Options {
> >         signature = md5
> >         wilddir  = "/home/*/Movies"
> >         wild     = "/home/*/Movies/*"
> >         wilddir  = "/home/*/Music"
> >         wild     = "/home/*/Music/*"
> >         wilddir  = "/home/*/Pictures"
> >         wild     = "/home/*/Pictures/*"
> >       }
> >
> >       Options {
> >         wild = "/home/*/*"
> >         Exclude = yes
> >       }
> >
> >       File = /home
> >   }
> > }
> 
> this does the trick. Thanks a lot.
> 
> > The only problem is that it also includes everything directly in /home, but
> > that may not matter.
> 
> not that I can see. The wild = "/home/*/*" directive also seems to 
> match "/home/*" for a reason that I do not quite understand.

That's not what happens for me -- e.g. if a file (not directory) called
/home/bogus exists then it will be backed up, which indicates that it does not
match /home/*/* (as expected).


> Adding wilddir = "/home/*" to the include block selects all dirs directly 
> in /home, which indicates that everything was selected by the File = /home 
> directive... also removing the exclude block selects everything (both tested 
> with estimate).

Yes, adding wilddir = "/home/*" will recursively match all dirs (but not
files) underneath /home.

__Martin

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to