Bacula-users

[Bacula-users] Which tapes to put into the tape library?

2010-01-21 11:40:29
Subject: [Bacula-users] Which tapes to put into the tape library?
From: John Jorgensen <jorgnsn AT lcd.uregina DOT ca>
To: "Dan Langille" <dan AT langille DOT org>
Date: Thu, 21 Jan 2010 10:36:03 -0600
>>>>> "dan" == Dan Langille <dan AT langille DOT org> writes:

    dan> I have about 100 tapes.  My tape library holds only 10 tapes.
    dan> How do you decide which tapes to load into the library?  What strategy 
do
    dan> you use?

I have a variant of your query that orders the volumes by the
date when they should be eligible for reuse.  (Our mechanism for
keeping the first backups of each month for a year is to adjust
their volretention above the default, so the volretention is not
uniform.)

 SELECT VolumeName AS Volume, 
        CASE WHEN InChanger != 0
          THEN text(Slot) 
          ELSE ''
        END AS SLOT, 
        LabelDate, FirstWritten, LastWritten, 
        CASE LastWritten IS NULL 
          WHEN TRUE THEN now()
          ELSE LastWritten + CAST(CAST(Media.VolRetention AS text) AS interval) 
        END AS Eligible,
        Media.VolRetention/3600/24 AS Ret,
        VolJobs AS Jobs, VolBlocks, 
        VolBytes/1024/1024/1024 AS GB,
        VolStatus AS STATUS, Media.Recycle
 FROM Media LEFT JOIN Pool USING (PoolId)
 WHERE Pool.name = 'Generic Full ML6000 Pool'
 ORDER BY Eligible,volumename

So when it's time to rotate tapes out of the library, I run the
query and load the volumes at the top of the list back into the
library (I also store the tapes on the shelf in more or less the
same order, so there is a unautomated fallback mechanism :-).:

volume | slot |      labeldate      |    firstwritten     |     lastwritten     
|           eligible            | ret | jobs | volblocks | gb  | status | 
recycle
--------+------+---------------------+---------------------+---------------------+-------------------------------+-----+------+-----------+-----+--------+---------
 003053 | 21   | 2009-01-12 02:06:27 | 2009-01-12 02:06:27 | 2009-01-15 
08:13:17 | 2009-04-15 08:13:17-06        |  90 |   26 |   8646231 | 519 | Full  
 |       1
 003011 | 22   | 2009-01-15 02:06:17 | 2009-01-15 02:06:17 | 2009-01-20 
02:41:30 | 2009-04-20 02:41:30-06        |  90 |   33 |   9394711 | 564 | Full  
 |       1
 003005 | 23   | 2009-01-20 02:06:25 | 2009-01-20 02:06:25 | 2009-01-22 
08:13:52 | 2009-04-22 08:13:52-06        |  90 |   10 |   8195717 | 492 | Full  
 |       1
 003012 | 10   | 2009-01-22 02:06:02 | 2009-01-22 02:06:02 | 2009-01-27 
09:32:11 | 2009-04-27 09:32:11-06        |  90 |   35 |   9718651 | 583 | Full  
 |       1
.
.
.


------------------------------------------------------------------------------
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