Kern Sibbald wrote:

Hello,

On Friday 18 March 2005 23:56, David Fuchs wrote:


Hello,

I've been trying to configure a FileSet that will only back up
specific file extensions, but I seem to be misunderstanding the syntax of
the FileSet records.

By searching the archives, I found the following FileSet example
from someone else in the same situation.  In my effort to back up only
certain file extensions (and exclude everything else by default) I came up
with a very similar FileSet definition myself (only I'm specifying
tarballs instead of M$ Office documents):




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 = ".?*$"

  just after the exclude = yes.

I would be interested to know if this works or not.


Thank-you for your message Kern. I tried both of your suggestions - both seem quite reasonable; however, the first one resulted in no files being backed up at all. The regex in the second suggestion produced config errors. I changed it to:

   regex = ".*"
   and I also tried
   regex = "^.*$"

Though both of these resulted in no files being backed up. I made sure to add the wild/regex statements after the exclude = yes, though the results were the same no matter where in the Options resource I placed them.

It's a curious thing... the wild = * or above regex statements in the second Options resource results in no files being backed up at all, yet it should not have even read that Options resource with regard to the tarballs I'm trying to back up (since those are matched by a previous Options Resource). Here is the latest version of my fileset config (which currently results in no files being backed up):

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

The directory /home/df/test consists of a combination of regular files, tarballs (tar.gz), and directories.

"An Options resource that does not contain a wild directive is assumed to
match any filename. This is important to understand, because once Bacula
determine that the Options matches the file under consideration, that
file will be saved without looking at any other Options resources that
may be present."



This is why I thought the above would work, but I think in fact that the above is wrong. On the other hand, if one drops out of all the Options, and nothing has matched, then everything is matched, and the Options from the last Options are used (but apparently not the exclude -- I'm going to look into this).


Thanks very much Kern, any other suggestions you or anyone else has are much appreciated!

-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