Bacula-users

Re: [Bacula-users] File-set include/exclude questions

2008-04-29 16:31:36
Subject: Re: [Bacula-users] File-set include/exclude questions
From: "Israel Miranda" <programadorlinux AT gmail DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 29 Apr 2008 17:31:24 -0300
Ok guys, now I read the manual very carefully, payed more attention to the description of the wilddir directive:
"Note, if you exclude a directory, no files or directories below
it will be matched."
So that's the where I got stuck. I need to include a directory 2 levels below the "Documents and Settings" on a per user basis, and If i exclude a directory on a higher level, nothing will be backed up.... I'm creating a longer fileset that worked but took me too long.

Thanks a lot Martin Simmons, I had already figured that out but thanks anyway.
There follows the fileset I created that solved my problem:

FileSet
{
  Name = "thunderbird-file-set"
  Enable VSS = yes
  Exclude
  {

     Options
     {
        # I tried to exclude everything, besides folders finishing with "thunderbird' but it dind't worked :p
    #RegexDir = "c:/Documents and Settings/*/Dados de aplicativos/([^t]|t[^h]|th[^u]|thu[^n]|thun[^d]|thund[^e]|thunde[^r]|thunder[^b]|thunderb[^i]|thunderbi[^r]|thunderbir[^d])/"
       WildFile = "c:/Documents and Settings/*"
       Wild = "c:/Documents and Settings/All Users"
       Wild = "c:/Documents and Settings/Default User"
       Wild = "c:/Documents and Settings/LocalService"
       Wild = "c:/Documents and Settings/NetworkService"
       WildFile = "c:/Documents and Settings/*/*"
       WildFile = "c:/Documents and Settings/*/*.*"
       Wild = "c:/Documents and Settings/*/Ambiente de impressão"
       Wild = "c:/Documents and Settings/*/.*"
       Wild = "c:/Documents and Settings/*/Ambiente de rede"
       Wild = "c:/Documents and Settings/*/Cookies"
       Wild = "c:/Documents and Settings/*/Configurações locais"
       Wild = "c:/Documents and Settings/*/Contacts"
       Wild = "c:/Documents and Settings/*/Desktop"
       Wild = "c:/Documents and Settings/*/Favoritos"
       Wild = "c:/Documents and Settings/*/Macromedia"
       Wild = "c:/Documents and Settings/*/Menu Iniciar"
       Wild = "c:/Documents and Settings/*/Meus documentos"
       Wild = "c:/Documents and Settings/*/Modelos"
       Wild = "c:/Documents and Settings/*/UserData"
       Wild = "c:/Documents and Settings/*/Recent"
       Wild = "c:/Documents and Settings/*/SendTo"
       Wild = "c:/Documents and Settings/*/workspace"
       WildFile = "c:/Documents and Settings/*/Dados de aplicativos/*"
       WildFile = "c:/Documents and Settings/*/Dados de aplicativos/*.*"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/Adobe"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/AVG7"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/BrOffice.org2"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/Help"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/Identities"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/Microsoft"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/Mozilla"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/NCH Swift Sound"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/Notepad++"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/PLSQL Developer"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/Sun"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/Skype"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/skypePM"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/WinRAR"



       #Wild = "c:/Documents and Settings/*/Dados de aplicativos/"
       #Wild = "c:/Documents and Settings/*/Dados de aplicativos/"

     }
  }

  Include
  {
     Options
     {
       signature = MD5         #Create MD5 Signature
       compression=GZIP       #Compress Incoming Data on the client
       #Exclude = no
       #Wilddir = "c:/Documents and Settings/*/Dados de aplicativos/Thunderbird/Profiles/"
     }
     File = "c:/Documents and Settings/"
  }
}

Later I'll make a request of this feature, could save people much time, and solve problems.
The problem I'll always have will be checking the job to see if it isn't backing up more files than needed to not make the volumes grow too much.

Thanks guys.


2008/4/29 Martin Simmons <martin AT lispworks DOT com>:
You can't do it by excluding the top level directories, because Bacula has to
walk the tree of files to find the ones you want.  As soon as it sees Exclude,
it will stop.  This happens on Linux too, so I doubt that configuration will
work there either.  You can do it by carefully including just the directories
that match

c:/Documents and Settings/*
c:/Documents and Settings/*/Dados de aplicativos
c:/Documents and Settings/*/Dados de aplicativos/Thunderbird
c:/Documents and Settings/*/Dados de aplicativos/Thunderbird/Profiles

and exclude everything else, but it is messy.

Another way is to generate the list on-the-fly.  See the File = "\|script"
option in the manual.  The backslash tells Bacula to run the script on the
client.

__Martin


>>>>> On Mon, 28 Apr 2008 11:55:19 -0300, Israel Miranda said:
>
> Hi guys, I tried your suggestions, but it didn't work as it should....
> I'm out of options now
>
> with the following file set:
>
> FileSet
> {
>   Name = "thunderbird-file-set"
>   Enable VSS = yes
>   Include
>   {
>      Options
>      {
>        Exclude = yes
>        Wild = "c:/Documents and Settings/*"
>      }
>      Options
>      {
>        signature = MD5         #Create MD5 Signature
>        compression=GZIP       #Compress Incoming Data on the client
>        Exclude = no
>        Wild = "c:/Documents and Settings/*/Dados de
> aplicativos/Thunderbird/Profiles/*"
>      }
>      File = "c:/Documents and Settings/"
>   }
> }
>
> Nothing is backed up, I have tried every suggestion you guys gave me, and
> those in the manual.
> The manual shows an example very similar to the one you suggested me, but
> it's on a *nix client/machine. I made many tests, and bacula does match the
> "Wild = "c:/Documents and Settings/*/Dados de
> aplicativos/Thunderbird/Profiles/*" " I create a test job including the
> whole "Documents and Settings directory", and excluding the above, and it
> worked, however if I exclude the whole directory "Documents and Settings"
> exacly as I did on the file set above, no file is backed up at all. I tried
> changing the order of the options, and many other things, but nothing
> worked.
> Using the console to test the file set I get the following output:
>
>  estimate job="francisco-job" fileset="thunderbird-file-set" level="Full"
> client="suporte_001-fd"
>
> Connecting to Client suporte_001-fd at suporte_001:9102
>
> 2000 OK estimate files=1 bytes=0
>
>
> If someone who administer a network with windows machines, making backup of
> a specific folder on a per profile basis can help me, I'd thank very much.
> The above configurations seems to work on a linux machine, but not perfectly
> on a windows one
>
> BTW, on the client I'm using:
>
> suporte_001-fd Version: 2.2.8 (26 January 2008)  VSS Linux Cross-compile
> Win32
> and on the server I'm using:
> anita-dir Version: 2.2.8 (26 January 2008) i486-pc-linux-gnu debian 4.0
> anita-sd Version: 2.2.8 (26 January 2008) i486-pc-linux-gnu debian 4.0
>
> Thanks very much folks.
>
>
>
> 2008/4/24 Israel Miranda <programadorlinux AT gmail DOT com>:
>
> > Hi Silver, that's what I imagined, I just posted this questions on the
> > list to make sure of this.
> > Maybe this should be a feature in the wishlist?
> >
> > I included the escaped quotes because I read in the manual that if the
> > path has spaces, it should be passed to the windows file daemon within
> > quotes..... I'll make some tests without the quotes to see if it works.
> >
> > And Silver, thank you very much for the example, even though I imagined
> > how it was supposed to be done, with an example it gets much easier.
> >
> > Eitan, thanks for the tip, but isn't wildfile for files only?
> > Inside this profile directory there's another directory which has a random
> > name, and that's the directory I need to backup up. But thanks for the tip
> > anyway.
> >
> >
> > 2008/4/24, Eitan Talmi <eitant AT finjan DOT com>:
> >
> > >  Hi Israel
> > >
> > >
> > >
> > > You should use this format
> > >
> > >
> > >
> > > WildFile = "[A-Z]:/Documents and Settings/*/ Dados de
> > > aplicativos/Thunderbird/Profiles"
> > >
> > >
> > >
> > > Eitan
> > >
> > >
> > >
> > >
> > >
> > > *From:* bacula-users-bounces AT lists.sourceforge DOT net [mailto:
> > > bacula-users-bounces AT lists.sourceforge DOT net] *On Behalf Of *Israel
> > > Miranda
> > > *Sent:* Thursday, April 24, 2008 1:21 AM
> > > *To:* bacula-users AT lists.sourceforge DOT net
> > > *Subject:* [Bacula-users] File-set include/exclude questions
> > >
> > >
> > >
> > > Hi there guys.
> > >
> > >    I'm configuring bacula to backup thunderbird data in different
> > > machines, and to not define a fileset to each machine I'm
> > > trying to define a wilddir option that matches every user data in any
> > > machine, but it didn't worked.
> > > That's the file-set:
> > >
> > > FileSet
> > > {
> > >   Name = "thunderbird-file-set"
> > >   Enable VSS = yes
> > >   Include
> > >   {
> > >      Options
> > >      {
> > >        signature = MD5         #Create MD5 Signature
> > >        compression=GZIP       #Compress Incoming Data on the client
> > >        WildDir = "\"c:/Documents and Settings/*/Dados de
> > > aplicativos/Thunderbird/Profiles/\""
> > >      }
> > >
> > >   }
> > > }
> > >
> > > I know there's a include file option missing but that's the point:
> > > I don't want to include the whole Documents and Settings directory to
> > > exlcude all the other except the one I want to back up. I read the 11th
> > > chapter of the manual, and there is no example of what I want, which is just
> > > include a wildcard/regex to backup what I want, without including a
> > > directory to later exclude what I don't need. It seemed to me that there is
> > > no way of doing it the way I want(without an exclude option).
> > > The concept of including a wider selection to then exclude what I don't
> > > need seems bizarre to me.
> > > Would be nice if bacula director accept this config without error:
> > >
> > > FileSet
> > > {
> > >   Name = "thunderbird-file-set"
> > >   Enable VSS = yes
> > >   Include
> > >   {
> > >      Options
> > >      {
> > >        signature = MD5         #Create MD5 Signature
> > >        compression=GZIP       #Compress Incoming Data on the client
> > >      }
> > >      WildDir = "\"c:/Documents and Settings/*/Dados de
> > > aplicativos/Thunderbird/Profiles/\""
> > >   }
> > > }
> > >
> > > but bacula doesn't start and outputs this error:
> > > Restarting Bacula Director: 23-Abr 19:04 bacula-dir: ERROR TERMINATION
> > > at inc_conf.c:378
> > > Config error: Keyword WildDir not permitted in this resource
> > >
> > > Thanks in advance.
> > >
> > >
> > > --
> > > Meus cumprimentos,
> > >
> > > Israel Vinícius Nogueira Miranda
> > >
> >
> >
> >
> > --
> > Meus cumprimentos,
> >
> > Israel Vinícius Nogueira Miranda
> >
>
>
>
> --
> Meus cumprimentos,
>
> Israel Vinícius Nogueira Miranda



--
Meus cumprimentos,

Israel Vinícius Nogueira Miranda
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
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>