Hi all,

This looks like a bug to me, but I'd like someone who knows Bacula a
bit better to test it out. The synopsis is that the order in which
Bacula 5.0.3 recycles volumes prior to a job, and determines whether
an Incremental or Differential backup needs to be upgraded to Full, is
reversed.

Here are the relevant parts of the config for my example:

Pool {
        VolumeUseDuration = 1 mins
        VolumeRetention = 1 mins
        ...
}

Job {
        Level = Incremental
        Accurate = yes       # Not sure if this is relevant or not
        ...
}

I assume that you have just one pool and job defined for this example.
The catalog database is initially empty. In my case, I'm using
file-based volumes on FreeBSD 8.2 amd64.

# /usr/local/etc/rc.d/bacula-dir start
# /usr/local/etc/rc.d/bacula-sd start
# /usr/local/etc/rc.d/bacula-fd start
# bconsole
*label volume=v0
*run yes
--- wait >1 minute ---
*run yes
*status dir
...
 JobId Level   Name                       Status
======================================================================
     2 Increme  Atom.2011-04-07_15.12.08_04 has a fatal error
...
*cancel
yes
*run yes

I started 3 jobs in this example, so I'll refer to them simply as 1st,
2nd, and 3rd, with the 2nd job being the one that had a fatal error.
Here's what is happening:

I first try to perform an Incremental backup, which gets upgraded to
Full. By waiting 1 minute, volume v0 gets marked as Used
(VolumeUseDuration = 1 mins) when the 2nd job is started. The 2nd job
then looks for a volume to use, doesn't find any appendable ones, but
realizes that v0 can now be recycled (VolumeRetention = 1 mins).

The problem is that by recycling v0, Bacula lost the Full backup that
the 2nd job needed in order to be an Incremental. The 2nd job should
be upgraded to Full at this point, but it stays as Incremental and
fails with a fatal error (after marking v0 as Recycled). The 3rd job
sees that v0 is marked as Recycled to begin with and is correctly
upgraded to Full.

Here is what I get in the log for the 2nd job:

07-Apr 15:12 atom-dir JobId 2: Start Backup JobId 2,
Job=Atom.2011-04-07_15.12.08_04
07-Apr 15:12 atom-dir JobId 2: Max configured use duration=60 sec.
exceeded. Marking Volume "v0" as Used.
07-Apr 15:12 atom-dir JobId 2: There are no more Jobs associated with
Volume "v0". Marking it purged.
07-Apr 15:12 atom-dir JobId 2: All records pruned from Volume "v0";
marking it "Purged"
07-Apr 15:12 atom-dir JobId 2: Recycled volume "v0"
07-Apr 15:12 atom-dir JobId 2: Using Device "BackupVol"
07-Apr 15:12 atom-dir JobId 2: Fatal error: Cannot find previous jobids.
07-Apr 15:12 atom-dir JobId 2: Fatal error: Network error with FD
during Backup: ERR=Interrupted system call
07-Apr 15:12 atom-sd JobId 2: JobId=2
Job="Atom.2011-04-07_15.12.08_04" marked to be canceled.
07-Apr 15:12 atom-sd JobId 2: JobId=2
Job="Atom.2011-04-07_15.12.08_04" marked to be canceled.
07-Apr 15:12 atom-dir JobId 2: Fatal error: No Job status returned from FD.
07-Apr 15:12 atom-dir JobId 2: Error: Bacula atom-dir 5.0.3 (04Aug10):
07-Apr-2011 15:12:33
...

The fix for this problem should be to recycle volumes before deciding
if the job needs to be upgraded to a full backup.

- Max

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to