On 07/26/12 02:35, Sven Tegethoff wrote: > On 25.07.2012 17:50, Phil Stracchino wrote: >> i think we need to understand more about the use cycle for these >> volumes. Are these weekly tapes written to once per week with a single >> job or set of jobs, or are they continuously appended to over the >> course of a week? > > Let's just take a look at the daily backups, and only those that fit on > one tape. (My problem is not limited to those, but it'll make it simpler > to explain.) > > There is a SET of jobs for every night, backing up different machines to > the same tape one after another. The next morning, the tape is being > swapped out for the next day's tape. Tapes are supposed to be re-used > every week, so there is a "monday" tape, a "tuesday" tape, and so on, > and the old expired backup from the preceeding week that's still on it > is supposed to be automatically overwritten. > > However, when the last job of the night finishes, and there's still room > on the tape, bacula will leave the volume in "appendable" state. And > when the tape is re-inserted the next week to be overwritten, bacula > insists to append to it - no matter what the "max use duration" and the > volume retention period is. And the only way to prevent this is to > manually update the volume status to "used". > > This is actually documented. Why "max use duration" won't work is > described in > > http://www.bacula.org/5.0.x-manuals/en/main/main/Configuring_Director.html > > Quote: "The use duration is checked and the *Used* status is set only at > the end of a job that writes to the particular volume".
The following is a relevant Pool definition from my configuration: Pool { Name = Incr-Disk Storage = babylon4-file Pool Type = Backup Recycle = no Recycle Oldest Volume = no Recycle Current Volume = no AutoPrune = yes Volume Retention = 1 month Maximum Volume Jobs = 0 Volume Use Duration = 23h Label Format = "INCR-$Year${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}:${Minute:p/2/0/r}" RecyclePool = Scratch } And here's the beginning of the log from the first job to run last night: 26-Jul 04:30 babylon4-dir JobId 1306: shell command: run BeforeJob "/opt/bacula/sbin/checkhost babylon4" 26-Jul 04:30 babylon4-dir JobId 1306: BeforeJob: Client babylon4 has address 10.24.32.14 26-Jul 04:30 babylon4-dir JobId 1306: Start Backup JobId 1306, Job=Babylon4_Backup.2012-07-26_04.30.00_02 26-Jul 04:30 babylon4-dir JobId 1306: Max configured use duration=82,800 sec. exceeded. Marking Volume "INCR-20120725-04:30" as +Used. 26-Jul 04:30 babylon4-dir JobId 1306: Created new Volume "INCR-20120726-04:30" in catalog. 26-Jul 04:30 babylon4-dir JobId 1306: Using Device "FileStorage" 26-Jul 04:30 babylon4-sd JobId 1306: Labeled new Volume "INCR-20120726-04:30" on device "FileStorage" (/spool/bacula). 26-Jul 04:30 babylon4-sd JobId 1306: Wrote label to prelabeled Volume "INCR-20120726-04:30" on device "FileStorage" +(/spool/bacula) The volume INCR-20120725-04:30 was created yesterday morning. This morning Bacula went to start the job, checked the volume, determined it had exceeded its use duration, marked it used, and created a new one. For me, this Just Works. If you're doing the same thing, I don't understand why it's not working for you. -- Phil Stracchino, CDK#2 DoD#299792458 ICBM: 43.5607, -71.355 ala...@caerllewys.net ala...@metrocast.net p...@co.ordinate.org Renaissance Man, Unix ronin, Perl hacker, SQL wrangler, Free Stater It's not the years, it's the mileage. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users