Bacula-users

Re: [Bacula-users] duplicate full backups

2008-08-11 06:23:40
Subject: Re: [Bacula-users] duplicate full backups
From: Silver Salonen <silver AT ultrasoft DOT ee>
To: bacula-users AT lists.sourceforge DOT net
Date: Mon, 11 Aug 2008 13:22:22 +0300
On Tuesday 22 April 2008 12:37:38 Silver Salonen wrote:
> On Monday 07 April 2008 16:22, Arno Lehmann wrote:
> > 07.04.2008 15:05, Silver Salonen wrote:
> > > On Monday 07 April 2008 10:37, Arno Lehmann wrote:
> > >> 07.04.2008 06:04, Seth Miller wrote:
> > >>> How can I force Bacula to complete a job before it starts a new one
> > >>> for the same client?
> > >> You can't, now, I believe.
> > > 
> > > But you can automatically cancel the incremental job that would be 
> upgraded to 
> > > duplicate full. I'm doing it with:
> > > 
> > > JobDefs {
> > >         ...
> > >         Max Wait Time = 12h
> > > }
> > > 
> > 
> > Well, if you're using that approach, and usually have jobs run 
> > concurrently (so normally the jobs don't have to wait at all) I'd set 
> > the wait time rather low, like 5 minutes. Otherwise, if a job takes 35 
> > hours, you'll end up with another full backup...
> > 
> > Also, the "Incremental Max Wait Time" seems to be broken... at least 
> > that's what I read on -devel by Eric Bollengier.
> 
> Actually yes, right you are, that's not a solution. Especially as the "Max 
> Wait Time" causes the running backups to be cancelled after the specified 
> time (I complained about this in a separate thread).
> 
> Right now it came to me that the same check could be done with "run before 
> job" script. A quick example (check-job.sh):
> =====
> jobName="$1"
> jobId="$2"
> if ( echo "status dir" | bconsole | grep -v "${jobId}" | grep "Job 
> ${jobName}.* is running" ); then
>         exit 1
> else
>         exit 0
> fi
> =====
> The script should be ran with "Run Before Job = check-job.sh '%n' '%i'".
> 
> Some notes after testing that solution:
> * the same job must be able to run concurrently, because "run before job" is 
> executed before starting backup, not when the job is scheduled
> * user of bacula-dir (running process) must be able to access bconsole.conf
> * the "Run Before Job" may be used next to other "run script" directives
> 
> Any thoughts on that approach?

I discovered a problem with this solution (which is actually weird because I 
thought I checked and tested it multiple times) - "Rerun Failed Levels" has to 
be turned off, otherwise: if a job won't run because of "Run Before Job" 
script returning 1, job's level is upgraded on the next run, because Bacula 
finds a failed backup from database: "Prior failed job found in catalog. 
Upgrading to Full."

If "Rerun Failed Levels = no", one has to be very sure that full backup is 
really ran (ie. if the machine is turned off on that day, it's not ran).

Any ideas on preventing that?

--
Silver

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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>
  • Re: [Bacula-users] duplicate full backups, Silver Salonen <=