0

I installed Bacula Backup on my Ubuntu Server 16.04 and it work fine when it comes to doing the backups. But I do have an issue with automatic volumes creation:

I configured my Pool with "Volume Use Duration = 23h" for an hourly backup. The problem is that Bacula creates a new volume every hour instead of using it for a day.

Here's my pool definition:

Pool {
  Name = HourlyPool
  Pool Type = Backup
  Volume Retention = 14 days
  Volume Use Duration = 23h
  Recycle = yes
  AutoPrune = yes
  LabelFormat = "HourVol-"
}

And the job definition:

Job {
  Name = HourlyBackup
  Type = Backup
  Level = Incremental
  Client = LinuxWebServer-fd
  FileSet = Hourly
  Schedule = HourByHour
  Storage = HourlyFile
  Pool = HourlyPool
  Messages = Standard
}

Every hour the backup is done and in the log I see these lines:

27-Mar 17:00 LinuxWebServer-dir JobId 706: Start Backup JobId 706, Job=HourlyBackup.2017-03-27_17.00.00_24
27-Mar 17:00 LinuxWebServer-dir JobId 706: Created new Volume="HourVol-0006", Pool="HourlyPool", MediaType="HourFile" in catalog.
27-Mar 17:00 LinuxWebServer-dir JobId 706: Using Device "VarBaculaHourly" to write.
27-Mar 17:00 LinuxWebServer-sd JobId 706: Labeled new Volume "HourVol-0006" on file device "VarBaculaHourly" (/var/baculahourly).
27-Mar 17:00 LinuxWebServer-sd JobId 706: Wrote label to prelabeled Volume "HourVol-0006" on file device "VarBaculaHourly" (/var/baculahourly)
27-Mar 17:00 LinuxWebServer-dir JobId 706: Max configured use duration=82,800 sec. exceeded. Marking Volume "HourVol-0006" as Used.

If I look at the director status, I see:

Job name        Level          Type     Run at            Volume
HourlyBackup    Incremental    Backup   27-Mar-17 18:00   *unknown*

It used to show the name of the volume to be used instead of *unknown*.

Anybody have a clue of what's happening here?

Thanks

sevynos
  • 61
  • 1
  • 7

1 Answers1

0

I found the problem and a solution which is not an ideal one but prevent the issue from happening:

Looking at Bacula's database I realized that for some reason it wasn't updating the "FirstWritten" and "InitialWrite" fields in the table keeping only the default value which was somewhere in 2008 making every volume expired right from their creation.

As a solution, I altered the table's structure by changing the default value to "CURRENT_TIMESTAMP". This solution is not really "elegant" but it solves the issue.

sevynos
  • 61
  • 1
  • 7