Bacula-users

Re: [Bacula-users] Bacula is not recycling/pruning/purging automatically

2009-01-06 17:44:45
Subject: Re: [Bacula-users] Bacula is not recycling/pruning/purging automatically
From: Dan Langille <dan AT langille DOT org>
To: Brian Debelius <bdebelius AT intelesyscorp DOT com>
Date: Tue, 06 Jan 2009 17:41:21 -0500
Brian Debelius wrote:
> I do two things.  I run an admin script after each nights run, that 
> marks the last tape written to as used.  I also run admin script before 
> each nights run, that moves purged or recycled media to the scratch pool.
> 
> This after admin scipt is for windows.
> 
> :_MarkAsUsed
> set tempfile="%working_dir%\adminjob.tmp"
> set inchanger=0
> 
> %mtx% -f Changer0 status > %tempfile%
> for /F "usebackq tokens=10" %%i in ( `findstr /R /C:"^Data Transfer 
> Element 0:Full" %tempfile%` ) do set inchanger=%%i
> 
> if (%inchanger%) NEQ (0) echo update volume=%inchanger% volstatus=used 
> quit | %bconsole%
> goto _End
> 
> The before admin script runs a mysql query.  If its in the changer, and 
> the pool is daily or weekly, and the status is purged or recycled, then 
> move it to the scratch pool. 
> 
> "UPDATE Media SET PoolId=3 where (VolStatus='Purged' or 'Recycled') AND 
> InChanger=1 AND (PoolId=5 OR PoolId=6);"

I can't condone direct manipulation of the database.

In short, the project does not promise it will do what you want; now, or 
in future releases.  In short, use at your own risk.


------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users