Bacula-users

Re: [Bacula-users] Schedule 4 disks rotating weekly

2017-01-04 12:19:13
Subject: Re: [Bacula-users] Schedule 4 disks rotating weekly
From: "Dean E. Weimer" <dweimer AT dweimer DOT net>
To: Bacula Users <bacula-users AT lists.sourceforge DOT net>
Date: Wed, 04 Jan 2017 10:49:06 -0600
On 2017-01-04 9:57 am, Phil Stracchino wrote:
> On 01/04/17 10:52, Martin Simmons wrote:
>>>>>>> On Fri, 30 Dec 2016 18:37:28 -0300, Sergio Belkin said:
>>> 
>>> I have 4 disks:
>>> 
>>> I'd want to plug every disk every monday.
>>> 
>>> So, Mondays run Full Backups and the rest of the days
>>> Differential/Incremental ones
>>> ...
>>> I'd want that operator: rotate from disk 1 to disk 4 regardless the 
>>> week of
>>> the month. Or at least is a way that set the number of week of the 
>>> month
>>> regardless of the day of week?
>> 
>> You could use "Week of Year" notation (w01, w02 etc) plus the day 
>> (mon, tue
>> etc).  The schedule might have to be rewritten every year to get 
>> continuity
>> though.
> 
> 
> Or you could go the calendar-independent route and set an appropriate
> volume use window.  If you set the volume use window to be just less
> than a week, expiring late Sunday night or early Monday morning, it 
> will
> force Bacula to rotate to the next volume weekly.
> 
> 

the official likely most correct answer would probably be to enable a 
virtual tape library and disk changer script. I am doing a similar thing 
but with only 3 disks instead of 4. I had looking into setting up a 
virtual tape library and about 30 minutes into trying to find out how to 
make everything work I thought this is way more complicated than it 
needs to be. So I rethought the idea and came up with a different 
solution.

I am using multiple backup disk volumes per disk, and setting the 
expiration on volumes and jobs at 18days, a few days under the 3 weeks 
that the disk will be reused, that way I am sure the fulls have expired 
even if some of the incremental jobs haven't before the next full as I 
don't have enough disk space for a second full backup.
I then simply created 3 scripts to set the volume enable/disable 
property. Then when I change the disk I run the correct script so that 
it disables the other volumes and enables the current ones.

Example script, this would enable the volumes on BV100 - BV102 and 
disable BV200 - BV202 & BV300 - BV303.

update volume=BV100 enabled=1
update volume=BV101 enabled=1
update volume=BV102 enabled=1

update volume=BV200 enabled=0
update volume=BV201 enabled=0
update volume=BV202 enabled=0

update volume=BV300 enabled=0
update volume=BV301 enabled=0
update volume=BV302 enabled=0

This approach may not be practical for you the virtual tape library 
approach I believe will require a lot less interaction on the operators 
part. In my case I am using FreeBSD on the server and encrypting the 
drives with GELI encryption so I have to login and attach the volume 
entering the password before it can be mounted so its not a big issue to 
then open bconsole and use @intput script to enable the correct volumes.

I have been doing this for about 5 years now, originally on 4 1TB disks 
and now on 3 2TB disks I couldn't afford a 4th 2Tb at the time I 
upgraded all of them and just never got around to adding a 4th later. 
Its been successful unless I forget to change disks, I keep the 2 not in 
use in my office desk drawer for offsite copies and run my full jobs on 
Monday night with incremental every now and then I forget to bring the 
oldest one home on Monday and with no disk drive laying around to remind 
me, I don't disable my fulls and they fail due to space and I have to do 
some cleanup.

-- 
Thanks,
    Dean E. Weimer
    http://www.dweimer.net/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
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>