Re: [Bacula-users] Bacula is not recycling/pruning/purging automatically
2009-01-06 17:16:24
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);"
PoolId 3 is Scratch
PoolId 5 is Daily
PoolId 6 is Weekely
Jonathan Larsen wrote:
> Is there away to tell it to recycle regardless? That would help me better
>
> determine which tapes i need to put into my autochanger.
>
------------------------------------------------------------------------------
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
|
|
|