Bacula-users

Re: [Bacula-users] regex strangeness with Windows filesets

2008-05-14 03:14:08
Subject: Re: [Bacula-users] regex strangeness with Windows filesets
From: Arno Lehmann <al AT its-lehmann DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Wed, 14 May 2008 09:13:22 +0200
Hi,

13.05.2008 22:33, Frans Lawaetz wrote:
>> Indeed, I think that is the reason it didn't work for the OP.  The regex
>> ".*doc" will match anything containing "doc", including
>> C:\Documents and Settings\foo.
>>
>> The correct usage is with two backslashes (because of the quotes) and 
>> a dollar
>> at the end, i.e.
>>
>> regexfile = ".*\\.doc$"
>>
>> However, it is simpler to use wildfile in this this case:
>>
>> wildfile = "*.doc"
>>
> I had tried that previously to no avail.  At the moment it looks like 
> the "first match" logic in fileset processing is not working correctly 
> with WindowsXP.  My config below generates zero matching files or 
> directories when an "estimate listing" is run via bconsole.  When I 
> comment the first "regexfile" directive in the Exclude list it starts 
> matching all files and directories not covered by the WildDir entries.  
> Unless I am missing something, this behavior is counter to the Bacula guide.
> Note that I do have .doc files in a subdirectory of "c:/Documents and 
> Settings/test"

Some comments below.

> FileSet {
>  Name = "WinClient"
>  Include {
>   Options {
>    signature = MD5
>    compression = GZIP3
>    IgnoreCase = yes
>    Wildfile = "*.doc"
>    }
>   }
> 
>  Exclude{
>   Options {

You don't put this sort of stuff into an exclude section. For options 
with exclude and regexfile to work, you need that in an Include.

I recommend a look into the manual again... but basically, changing 
the "Exclude{" to "Include{" should help a lot already.

Arno


>   # Exclude = yes
>    IgnoreCase = yes
>    regexfile = ".*"
>    wildfile = ".*mp3"
>    WildDir = "c:/Documents and Settings/Administrator"
>    WildDir = "c:/Documents and Settings/NetworkService"
>    WildDir = "c:/Documents and Settings/All Users"
>    WildDir = "c:/Documents and Settings/Default User"
>    WildDir = "c:/Documents and Settings/LocalService"
>    WildDir = "c:/Documents and Settings/*/Application Data"
>    WildDir = "c:/Documents and Settings/*/LocalService"
>    WildDir = "c:/Documents and Settings/*/Contacts"
>    WildDir = "c:/Documents and Settings/*/Start Menu"
>    WildDir = "c:/Documents and Settings/*/Windows"
>    WildDir = "c:/Documents and Settings/*/\..*"
>    WildDir = "c:/Documents and Settings/*/nethood"
>    WildDir = "c:/Documents and Settings/*/My Documents"
>    WildDir = "c:/Documents and Settings/*/printhood"
>    WildDir = "c:/Documents and Settings/*/LocalService"
>    # RegexDir = "/Documents and Settings/*"
>   }
>   File = "c:/Documents and Settings"
>  }
> }
> 
> 
> Thanks,
> Frans
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft 
> Defy all challenges. Microsoft(R) Visual Studio 2008. 
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 

-- 
Arno Lehmann
IT-Service Lehmann
www.its-lehmann.de

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users