Bacula-users

Re: [Bacula-users] regexdir stops bacula backup...

2009-03-03 10:48:40
Subject: Re: [Bacula-users] regexdir stops bacula backup...
From: Martin Simmons <martin AT lispworks DOT com>
To: dev.mansonthomas AT gmail DOT com
Date: Tue, 3 Mar 2009 15:43:21 GMT
>>>>> On Tue, 3 Mar 2009 15:20:46 +0100, Thomas Manson said:
> 
> Hi Martin,
> 
> So I should do this :
>  FileSet {
> Name = "computer.domain.com.FileSet"
> Include {
>   Options {
>     signature   = SHA1
>     compression = GZIP
>     *regexdir    = "/home/.*/web/public_html"*
>   }
>   File = /etc
>   File = /home/special/master
>   File = /usr/src/makeHttpd
>   File = /root
>   File = /backup/databases/lastbackup
>   *File = /home*
> }
> }

Yes, that's a start.


> 
> 
> > you need to exclude everything that doesn't match the regex and include
> > all of the directories above /home/user1/web.
> >
> 
> Well, I've nothing to backup between / and /home/*/web
> What's the point of using regexdir if I have to exclude everything else ?

That's just how it works.  Bacula doesn't scan the whole world looking for
something that matches the regexdir.

Instead, it searches down the tree starting from the 'File =' lines looking
for files to back up.  To prevent something from being backed up, you must
exclude it by using an Exclude section or by using options with 'exclude =
yes'.  See the *.gz example here:
http://www.bacula.org/en/rel-manual/Configuring_Director.html#SECTION001480000000000000000

When you exclude a directory, it doesn't look any further.  Therefore, to back
up selected subdirectories of /home/*, you need to make Bacula select all
directories leading up to those you want to back up, without selecting any of
ther contents.  Something like this (not tested):

  Include {
     Options {
        signature   = SHA1
        compression = GZIP
        # include the dirs in /home
        regexdir = "^/home/[^/]+$"
        # and include the web dirs of them
        wilddir   = "/home/*/web"
        # and the public_html dirs within the web dirs
        wilddir   = "/home/*/web/public_html"
        # and the contents of the public_html
        wild      = "/home/*/web/public_html/*"
     }
     Options {
        # exclude everything else
        Exclude = yes
        wild = "/home/*"
     }
     File = /home
   }

__Martin


> 
> For the fact that bacula FD stops with the regexp, I'll recheck, but I don't
> think their is something in the director's logs...
> 
> Thomas.
> 
>   On Thu, Feb 26, 2009 at 21:44, Martin Simmons <martin AT lispworks DOT com>
> wrote:
> >>>>>> On Thu, 26 Feb 2009 10:00:26 +0100, Thomas Manson said:
> >>
> >> Nobody has an idea?
> >
> > Bacula uses the File lines as the roots when it looks for files and none
> of
> > yours are going to find files in /home/user1 etc.  Also, you can't do what
> you
> > want directly with a single Options clause -- you need to exclude
> everything
> > that doesn't match the regex and include all of the directories above
> > /home/user1/web.
> >
> > Crashing is unexpected though.  What does the Bacula log say?  Can you
> repeat
> > it on a local machine without the ssh tunnel?
> >
> > __Martin
> >
> >
> >> On Tue, Feb 24, 2009 at 22:19, Thomas Manson <dev.mansonthomas AT gmail 
> >> DOT com
> >wrote:
> >>
> >> > I forgot to mention the bacula version :
> >> > server :
> >> > 2.4.2-1ubuntu6
> >> > client : Redhat ES4 with version : bacula-client-2.4.2-1.el4.i386.rpm
> >> >
> >> > Thomas
> >> >
> >> > On Tue, Feb 24, 2009 at 22:16, Thomas Manson <
> dev.mansonthomas AT gmail DOT com>wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> I want to backup this kind of directories :
> >> >>
> >> >> /home/user1/web/public_html
> >> >> /home/user2/web/public_html
> >> >> /home/user3/web/public_html
> >> >> /home/user4/web/public_html
> >> >>
> >> >> and subdirectories.
> >> >>
> >> >> I've run a find to list all dir of the home directory and test the
> >> >> following regexp on it with success :
> >> >>
> >> >> "/home/.*/web/public_html"  (with quote in the configuration file).
> >> >>
> >> >> When I run the backup, the job crashes :
> >> >>
> >> >> My SSH tunnel is stopped and when I run another backup, it tells me
> that
> >> >> the last volume do not have the correct number of byte (can't remember
> the
> >> >> exact message).
> >> >>
> >> >> If I comment the regexdir, it works normally.
> >> >>
> >> >>
> >> >> here is the fileSet :
> >> >>
> >> >> FileSet {
> >> >>  Name = "computer.domain.com.FileSet"
> >> >>   Include {
> >> >>    Options {
> >> >>       signature   = SHA1
> >> >>      compression = GZIP
> >> >>       #regexdir    = "/home/.*/web/public_html"
> >> >>    }
> >> >>     File = /etc
> >> >>    File = /home/special/master
> >> >>     File = /usr/src/makeHttpd
> >> >>    File = /root
> >> >>     File = /backup/databases/lastbackup
> >> >>  }
> >> >> }
> >> >>
> >> >> Any idea of how I can see what's going wrong?
> >> >>
> >> >> Thx,
> >> >> Thomas.
> >> >>
> >> >
> >> >
> >

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
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>