Bacula-users

Re: [Bacula-users] Still not getting wildcard matching

2011-06-24 08:55:26
Subject: Re: [Bacula-users] Still not getting wildcard matching
From: Stuart McGraw <smcg4191 AT frii DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Fri, 24 Jun 2011 06:52:49 -0600
On 06/23/2011 04:26 AM, Martin Simmons wrote:
>>>>>> On Wed, 22 Jun 2011 21:25:24 -0600, Stuart McGraw said:
[...]
>> I have not been seen in the Bacula manual a description of exactly 
>> how filenames match wildcard specs (e.g. does "a*b" match "a/b"?).  
> 
> Yes, that is the problem.  "/home/*/.*" matches "/home/smcg4191/Maildir/.foo"
> :-(  You'll probably have to use regex for that one.
> 
>> Is one available somewhere?
> 
> Look at man fnmatch.  Bacula can pass the FNM_CASEFOLD flag if IgnoreCase=yes
> is specified, but that is the only documented option.

Thanks.

Sadly, the linux man pages I looked at didn't give any
description of matching semantics but they do say it is
POSIX.2 conformant so it is possible to track down its
behavior that way.

It looks like Bacula contains its own implementation of
fnmatch so it should be possible for the Bacula documentation 
to describe its behavior directly without passing the buck 
to the OS docs.

fnmatch has a FNM_PATHNAME option that will cause "*" et.al.
not to match slashes.  Has there ever been consideration given
to allowing some form of Wild* directive that would use that
option?  It seems like that would have solved my problem and
make many FileSet rules more intuitive.  The current matching
rules make it pretty easy to exclude more than one intended.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security 
threats, fraudulent activity and more. Splunk takes this data and makes 
sense of it. Business sense. IT sense. Common sense.. 
http://p.sf.net/sfu/splunk-d2d-c1
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>