Bacula-users

[Bacula-users] Configuring monthly tape rotation scheme

2011-04-03 13:27:32
Subject: [Bacula-users] Configuring monthly tape rotation scheme
From: Maxim Khitrov <max AT mxcrypt DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Sun, 3 Apr 2011 12:25:04 -0400
Hello all,

Below, I describe the method by which I'd like to rotate several pools
of tapes. I did manage to get this working (using files for now), but
only by writing several shell scripts that perform the main purge
logic through bconsole. I'm thinking that this can't be the only way
to achieve what I'm after, so I must be missing a much simpler
solution.

For this example, suppose I start by defining 3 pools - A, B, and C.
All 3 are initially empty (contain no tapes) and there is a Scratch
pool in the autochanger from which new tapes will be used as needed.
On January 1st, I perform a Full backup of all clients to pool A. On
January 2-31 I run Incremental backups. On February 1st, A is replaced
by B and the entire process repeats (Full on the 1st, Incremental for
the rest of the month). C replaces B on March 1st, and A replaces C on
April 1st.

Now I have all 3 pools filled with daily backups for the past 3
months. All but one tape in each pool is marked as Full, while the
last one is marked as Append (assuming it wasn't filled completely).
No files, jobs, or volumes have been pruned at this time.

What I'd like to happen at this point, just prior to the next Full
backup that is scheduled to take place on April 1st, is for all
volumes in pool A to be recycled back into the Scratch pool. In other
words, I do not want any files, jobs, or volumes to be pruned until
just prior to the next Full backup. In addition, when the pruning
happens, I want it to affect all volumes in the pool at the same time
(no point in keeping Incrementals when the Full has been deleted).

To throw one other caveat into the mix, suppose instead of reusing
pool A in April, I decide to create and use a new pool D. In this
case, pool A and all jobs from January should continue to exist in the
catalog until I reuse it in May.

As far as I can tell, I can't achieve these criteria by using
retention directives or any other mechanisms (but I'd really like to
be wrong on this). Even for using retentions, what I need is a
PoolRetention directive, in order to prune all volumes in the pool.
Otherwise, suppose I set VolumeRetention to 3 months, but the last
tape used in January wasn't needed until January 31st. In this case,
that tape will continue to exist as part of pool A backups in April,
but the Full backup from January 1st that this tape depends on has
long been overwritten. This isn't terrible, but it wastes valuable
space.

The two other problems with retention periods are that 1) you cannot
insert a new pool into the cycle while maintaining jobs on pool A in
the catalog (without some manual tweaking?), and 2) even for existing
pools, it forces you to have a period of time during which the data is
still on the tapes, but the catalog entries had to be purged in order
for the tapes to be recycled some number of days later. There doesn't
seem to be any easy way to recycle all volumes in the pool just prior
to a specific job (except by writing shell scripts, as I have done).

Even PurgeOldestVolume doesn't really work, since that logic may kick
in during a backup (bad), whereas I want the purging to be done once
and only once at the beginning of a job. If I run out of tapes in the
Scratch pool, I want to get an email about it, not have the first
valid volume overwritten.

Hopefully my description of the problem was clear enough, but please
ask if it isn't. Essentially, I'm looking for is a way to recycle all
volumes in the current pool just prior to a Full backup. If the
volumes are tapes, they can go back to the Scratch pool and be reused
during the month as needed. If the volumes are files, they can remain
members of the pool, but be marked as Purged. Is there any existing
functionality to accomplish this?

- Max

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
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>
  • [Bacula-users] Configuring monthly tape rotation scheme, Maxim Khitrov <=