Kern Sibbald wrote:

It was probably me who proposed something like the following.  I suspect
it never worked because contrary to what I thought the exclude = yes
matches nothing.  So,  I have two suggestions that may work:

1. Add a
   wild = "*"
 just after the exclude = yes

2. Alternatively, and probably better, add a

regex = ".?*$"



Well, it looks like I made a small typo here (rather my International keyboard bit me). It should be:


     regex = "^.?*$"

However, life is never so simple; even that is wrong. Why? because it excludes everything even /home/df/test. The correct solution is to use:

    RegexFile = "^.?*$"

which excludes all files but not the directories.

So the complete correct FileSet *should* be:

FileSet {
 Name = "Test Set"
 Include {
       Options {
               WildFile = *.tar.gz
               signature = MD5
               compression = GZIP
       }
       Options {
               exclude = yes
               RegexFile = "^.?*$"
       }
       File = /home/df/test
 }
}

With the above, Bacula will backup all your *.tar.gz files as well as all the directories (no files) including and under /home/df/test. It is probably better to let the directories to be backed up so that if a file is restored, all the directories leading down to it are also restored with the proper owners/permissions.

Note, Regex/RegexFile/RegexDir do not work on Win32 systems since it is not in the Microsoft libraries, and I haven't take the time to dig out the source code and include it in Bacula.




Hi Kern,

Sorry for the late response on this one, I've been away from the computer for a few days.

Unfortunately, the changes utilizing WildFile and RegexFile aren't producing different results. Here is the message I received when I first made the changes and reloaded the configuration (I copy/pasted the provided FileSet):

22-Mar 17:26 davidfuchs-dir: ERROR TERMINATION at inc_conf.c:495
Config error: Regex compile error. ERR=repetition-operator operand invalid

           : line 119, col 35 of file /usr/local/bacula/etc/bacula-dir.conf
               RegexFile = "^.?*$"

So I changed the regex to

   RegexFile = "^.*$"

And it accepted the configuration, but backed up all files. I also tried using 'WildFile = *' after the 'exclude=yes' but got the same results.

I'm using version 1.36.2, which was compiled from source on FreeBSD 4.10-STABLE (gcc-2.95.4). Thank-you so far for your assistance, do you have any other ideas? Perhaps I should move to the development version and try with that? (Although I usually prefer keeping with the latest stable codebase, it's not a necessity). Looking forward to your response Kern!

Thanks,
-David Fuchs


begin:vcard
fn:David Fuchs
n:Fuchs;David
adr:;;;Langley;BC;;Canada
email;internet:[EMAIL PROTECTED]
note:Aut viam inveniam aut faciam
x-mozilla-html:FALSE
version:2.1
end:vcard

Reply via email to