Daniel Khan wrote:
> Hello List,
> 
> I am using bacula for some time now.
> I now want to change the whole backup strategy a little:
> 
> I have an Autochanger with 7 tapes.
> 
> One full backup takes ~2 Tapes.
> 
> I want to use 2 x 2 tapes for a weekly backup and the remeining 3 for daily
> differential/incremental backups.
> 
> Now the difficult part:
> I want to put such a 2 tape set at a secure place. So the best thing would
> be to run a weekly backup job which uses set 1 for week 1 and set 2 for week
> 2.
> 
> I think this can be done by creating 2 pools: Monthly1 and Monthly2 which
> run bi-weekly each.
> 
> Now one stupied question:
> 
> Is this supposed to work: 
> Monthly1 runs 1st and 3rd Sunday 
> and
> Monthly2 runs 2nd and 4th Sunday 
> 
> What happens if there isn't a 4th sunday within this month?

Since no month ever has less than 28 days, there can never be a month
that does not contain at least four Sundays.

> I think I am missing something here.
> Maybe anyone is kind enough to give me sume hints on this problem. Maybe the
> hole strategy is dumb and there is a better and smarter way to solve this
> problem.

Doing things on a month basis is problematic because the months are of
varying lengths that (except for February, 3 years out of 4 ... er ...
76 years out of 100 ... er ... 303 years out of 400 ... er ... stupid
calendar!) are not exact multiples of one week in length, and neither is
the year.  Therefore, ANY such scheme as this will ALWAYS sooner or
later get out of sync.

What I suggest you do instead is this:  Instead of trying to run first
and third Sundays etc, just make your Full backups run on alternate
tapes alternate weeks.  There is no straightforward way to do this with
a Schedule because of the aforementioned week/month/year length problem.
 The way to do this, therefore, is to forget trying to schedule the tape
alternation by the calendar, and just do it with tape retention times
instead.

To do this, put all four Monthly tapes into a single Pool.  Set your
volume use duration on that Pool to, say, two days, and the Job
retention time on the Pool to 12 days, then run Full backups against
that Pool every Sunday.

The first Sunday, you will use the first two tapes.  Two days later, on
Tuesday of the second week, those two tapes will be marked Used.  When
Sunday of the second week rolls around, Bacula will be unable to use
those Tapes because they are used and their retention time has not yet
expired.  It will therefore use tapes 3 and 4.  They will be marked Used
on Tuesday of the third week, leaving all tapes in the Pool used.  On
Friday of the third week, the retention on tapes 1 and 2 will expire.
When Sunday of week 3 rolls around, Bacula will look for an unused tape,
see that there are none, examine the existing tapes, and see that tapes
1 and 2 are past their retention time and are recyclable.  It will then
prune and recycle tapes 1 and 2 and use them again for the third Full
backup, starting the cycle over.



The key insight to making an alternate-week schedule like this work is
to realize that you cannot do it based off the calendar without that
calendar schedule breaking several times a year.  You have to base it
off the usage of the tapes instead.

Of course, we could solve this problem forever by adjusting the Earth's
orbit and rotation so as to make the mean solar year exactly 364 mean
solar days, allowing for a calendar having 13 months of exactly 28 days
each.  However, this is probably a little drastic of an undertaking just
to simplify making bi-weekly backup schedules.  :)



-- 
 Phil Stracchino       [EMAIL PROTECTED]
    Renaissance Man, Unix generalist, Perl hacker
 Mobile: 603-216-7037         Landline: 603-886-3518


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to