Bacula-users

Re: [Bacula-users] Delete volume file after retention time

2017-01-19 16:38:30
Subject: Re: [Bacula-users] Delete volume file after retention time
From: Ana Emília M. Arruda <emiliaarruda AT gmail DOT com>
To: Daniel Heitepriem <daniel.heitepriem AT pribas DOT com>
Date: Thu, 19 Jan 2017 22:37:02 +0100
Hello Daniel and Wanderlei,

There is a misunderstanding regarding the 'Volume Retention'  period.

On Thu, Jan 19, 2017 at 10:54 AM, Daniel Heitepriem <daniel.heitepriem AT pribas DOT com> wrote:
On 18.01.17 16:16, Wanderlei Huttel wrote:
Prune (Autoprune = Yes) is used to clean (Files and Jobs) from catalog using the parameters (File Retention and Job Retention)

There is another parameter (Volume Retention) that is used to keep the data safe in the Volume (physical volume)
So "Volume Retention" kind of protects the volume for a specific time to not get used again, right? If this period is over the volume gets purged so every data on it is wiped out and it can be rewritten with new data thus be seen as a "clean" volume like it had been freshly created.

​If Recycle=yes and Autoprune=yes are configured in a Pool resource, a volume can be reused before its Volume Retention period is reached. This will happen if bacula needs a volume and it can't create (label) a new one and it doesn't find any available (Append or Purged status) in the Pool.

If this condition is reached, then bacula will look if the oldest volume (Used or Full) has no jobs/files entries in catalog (this means all the jobs and files backed up in this volume were previously pruned from catalog). If this happens, this volume can potentially be reused even before its retention time is expired.

For example:

1) a Client has configured: AutoPrune=yes, Job Retention = 90 days, File Retention = 30 days
2) the job for this client uses a Pool configured: Recycle=yes, AutoPrune=yes, Volume Retention = 180 days, no automatic label configured
3) let's suppose I run a full backup for this client every day and each job is backed up into one volume

Now suppose I have only 120  volumes in this pool:

VOL-0001 to VOL-0120

For the job run after 120 days, bacula will not be able to create a new one (automatic label is not configured) and I will have all 120 volumes marked as "Used" (so no available volume to be used).

In this case, bacula will start the recycling algorithm (because of Recycle=yes).

Since I have AutoPrune=yes for my client, all jobs and files older than 90 days had been pruned (after each job run for this client, the autoprune of jobs and files is done). So I will have the 30 oldest volumes with no more jobs and files entries in Catalog.

In this case, the recycling algorithm will select the oldest volume in the Pool (last time written) and check if it has jobs and files entries in catalog. Since the jobs and files associated to this volume were previously pruned (after 90 days, because of client having AutoPrune configured), bacula will reuse this volume despite of the fact its retention period was not reached (180 days).

Hope this helps.

Best regards,
Ana

------------------------------------------------------------------------------
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>