Bacula-users

Re: [Bacula-users] Question about recycle = no

2010-01-15 09:35:51
Subject: Re: [Bacula-users] Question about recycle = no
From: Jon Schewe <jpschewe AT mtu DOT net>
To: John Drescher <drescherjm AT gmail DOT com>
Date: Fri, 15 Jan 2010 08:32:01 -0600
On 1/15/10 7:48 AM, John Drescher wrote:
>>> I asked this same question recently.  There isn't a standard one.  I
>>> will be writing one shortly for my own needs.
>>>
>>>
>>>       
>> Turns out it was really easy, I wrote one last night. It's below. You
>> just want to change the find part of the script to find the appropriate
>> volumes, then run this as a before or after job script. You will want to
>> check this by working with a test pool, as I did, just to be sure it's
>> right.
>>
>> #!/bin/bash
>>
>> for file in `find /mnt/mybook/bacula -name 'Test-*'`; do
>>  volume=`basename ${file}`
>>  echo "*** Deleting Vol ${volume} from bacula catalog"
>>  /usr/sbin/bconsole <<EOF
>> delete volume="${volume}" yes
>> quit
>> EOF
>>  echo "*** Deleteing ${file} from disk"
>>  rm -f ${file}
>> done
>>
>>     
> I think others were looking for the more complicated task of deleting
> file volumes automatically after their retention period had expired.
>
>   
That's what I intend to do as well by changing the find to be this:

find /mnt/mybook/bacula -mtime +65

This finds all files that haven't been modified in 65 days or more. If
the retention period is set to 60 days, this would be a pretty safe way
to do it.

-- 
Jon Schewe | http://mtu.net/~jpschewe
If you see an attachment named signature.asc, this is my digital
signature. See http://www.gnupg.org for more information.

For I am convinced that neither death nor life, neither angels nor
demons, neither the present nor the future, nor any powers,
neither height nor depth, nor anything else in all creation, will
be able to separate us from the love of God that is in Christ
Jesus our Lord. - Romans 8:38-39


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users