Bacula-users

[Bacula-users] Fwd: Volume Relabelling

2009-01-19 13:10:38
Subject: [Bacula-users] Fwd: Volume Relabelling
From: John Drescher <drescherjm AT gmail DOT com>
To: bacula-users <Bacula-users AT lists.sourceforge DOT net>
Date: Mon, 19 Jan 2009 13:08:20 -0500
---------- Forwarded message ----------
From: John Drescher <drescherjm AT gmail DOT com>
Date: Mon, Jan 19, 2009 at 1:08 PM
Subject: Re: [Bacula-users] Volume Relabelling
To: Alex Ehrlich <Alex.Ehrlich AT mail DOT ee>


On Mon, Jan 19, 2009 at 12:25 PM, Alex Ehrlich <Alex.Ehrlich AT mail DOT ee> 
wrote:
> OK, not "recycled" but "reused after recycling"; sorry, I didn't express
> myself correctly.
> And, of course, it should be optional; I meant mostly *-to-disk scenarios.
>
> Any idea how this can be managed "by bconsole scripting" as someone had
> suggested?
>
Basically you will be implementing Automatic recycling externally.

cron job each night to check the volumes.

1) grab the output of list media.

echo "list media pool=SomePool" | bconsole > output.txt

2) Filter this by the volumes that are Full or Used.

grep

3) Out of what is left do time arithmetic between the last written
date and the retention period (in seconds).

awk

4) If any volumes are recyclable. Select the one with the last written
the oldest.

5) Then purge that volume and relabel it to whatever you want.


John



-- 
John M. Drescher

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
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>