---------- Forwarded message ---------- From: John Drescher <dresche...@gmail.com> Date: Mon, Jan 19, 2009 at 1:08 PM Subject: Re: [Bacula-users] Volume Relabelling To: Alex Ehrlich <alex.ehrl...@mail.ee>
On Mon, Jan 19, 2009 at 12:25 PM, Alex Ehrlich <alex.ehrl...@mail.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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users