On 2012-12-05 20:17, Jonathan Horne wrote:
> What process keeps the bacula database size under control? Mine is
> growing and growing, and I'm not sure how much space i need to
> allocate for future growth.
First, some questions:
What version of Bacula are you using?
What version of PostgreSQL are you using?
How large is your database? I'm expecting output like this:
bacula=# select pg_size_pretty(pg_database_size('bacula'));
Next, some background, which you many already know, but is highly
to the topic.
The database is used to store the Catalog, which is a list of what was
backed up, from what client, when, and where is it stored. The Catalog
is one of the strongest features of Bacula. Personally, it is what drew
me to Bacula.
Retention refers to how long data remains in the Catalog. It is *not*,
as commonly misunderstood, how long your backups are retained.
are three retention values that can be specified:
* File Retention
* Job Retention
* Volume Retention
Once *any one* of these retention periods has expired, the Volume is
for recycling. Once a Volume is recycled, the data that *was* on
that Volume is
lost forever. NOTE: just because a Volume is eligible for recycling
does not mean
that it WILL be recycled. Bacula must first need a Volume to write to
and be unable
(according to configuration restrictions) to create a new Volume or
an existing Volume). Bacula recycles a Volume as a last measure.
It is important to note that Catalog information is the basis for
data. Restores can be done without the Catalog, but I sure wouldn't
want to do that.
I set File retention very high. 3 years. I set Job retention very
high. 3 years.
I then let Volume retention dictate how long a given backup is kept. I
for three weeks. I differentials for 3 months. I keep Fulls for 3
About database size: Disk space is cheap. I have TB of data on disk
and tape. My database
is 22G. That's a big database by some standards, but it's not a hefty
database when PostgreSQL
I consider that ease of restore is the primary consideration. When it
comes time to restore data,
I want to do it right now. I don't want to deal with bextract, bls,
etc (the tools that you would use
if you had no Catalog). That is why I keep my retention values so
high. That is why I keep
File retention = Job Retention.
My recommendation: unless you're running into problems with the
database size, let it grow.
 - some may wish to argue it is the same, but it isn't.
 - as I wrote a while ago:
 - There is more to recycling than this. Pruning, purging, etc.
Dan Langille - http://langille.org/