Bacula-users

Re: [Bacula-users] Overwriting expired File Volume

2011-02-07 13:16:49
Subject: Re: [Bacula-users] Overwriting expired File Volume
From: Josh Fisher <jfisher AT pvct DOT com>
To: Graham Keeling <graham AT equiinet DOT com>
Date: Mon, 07 Feb 2011 13:13:58 -0500
On 2/7/2011 10:43 AM, Graham Keeling wrote:
> On Mon, Feb 07, 2011 at 03:31:20PM +0000, Graham Keeling wrote:
>> On Mon, Feb 07, 2011 at 10:09:12AM -0500, Josh Fisher wrote:
>>> On 2/7/2011 6:54 AM, Graham Keeling wrote:
>>>> On Mon, Feb 07, 2011 at 06:43:17AM -0500, Phil Stracchino wrote:
>>>>> On 02/07/11 04:11, xunil321 wrote:
>>>>>> I have a lack of understanding concerning the handling of a disk based 
>>>>>> file
>>>>>> volume to
>>>>>> avoid a disk overflow. Let's say there is a 100MB file volume "Volume-1".
>>>>>> What will be
>>>>>> happen after the Volume Retention Period when the Recycle and AutoPrune 
>>>>>> are
>>>>>> set to
>>>>>> "Yes" in our Pool setup?
>>>>>> Will Bacula 5.0.2 clean the 100MB contents of the file "Volume-1" so 
>>>>>> that it
>>>>>> will start from
>>>>>> scratch or do i have to delete/relabel the volume manually for further
>>>>>> usage?
>>>>> Starting with 5.0.x, there is a feature by which purged disk volumes can
>>>>> be automatically truncated.  This feature was BROKEN AND UNSAFE in
>>>>> 5.0.1.  It is my recollection that it is fixed, and works properly, in
>>>>> 5.0.3...  but as with all things, test first before you put it into
>>>>> production, just to be sure.
>>>> I can save you some testing and tell you that this feature doesn't work 
>>>> because
>>>> it doesn't truncate automatically.
>>>>
>>>> See the last comment here:
>>>>
>>>> http://sourcefORGE.NET/apps/wordpress/bacula/2010/02/01/new-actiononpurge-feature/
>>> It does work with 5.0.3. A simple console command, 'purge volume
>>> action=all pool=pool_name', can easily be scripted with the RunScript
>>> directive. I run it as a "run after" script in my catalog backup job,
>>> but it can be run before a particular job, etc. just as easily.
>> I stand corrected! I shall try this out, one day.
>> So I need a RunScript on every job, which runs the truncate commands for each
>> pool that the job uses.
>> Thank you.
> It occurs to me that I might prefer to run the 'truncate all' command via
> a cron job, at some point in the day that bacula doesn't know about.
>
> Is there a reason, or reasons, that I should not do this?

The documentation states "Be sure that your storage device is idle when 
you decide to run this command". So it is likely best to use a RunScript 
rather than running from cron. The command can also be 'purge volume 
action=truncate storage=storage_name allpools' to purge multiple pools. 
Which is better just depends on your setup, how many storage devices, 
which pools can be used with which storage devices, etc. But there is no 
reason you cannot run multiple truncate actions before/after a single 
job if needed.

I truncate after all nightly jobs have run by putting a RunScript in the 
catalog backup job, which has a lower priority that all other jobs 
forcing it to run last. That way I know the storage devices are idle 
when the truncate runs. To truncate before jobs run, I would probably 
designate a single job to have a higher priority so that it is forced to 
run first, then configure the RunScript to run before that job. Again, 
this would guarantee (more or less) that the storage devices are idle.


------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users