On Sun, Sep 17, 2006 at 10:21:38PM +0200, Kern Sibbald wrote: > The algorithm is very clearly described in the manual at: > http:/www.bacula.org/dev-manual/Automatic_Volume_Recycling.html#SECTION000243000000000000000 This is the description,
* If the request is for an Autochanger device, look only for Volumes in the Autochanger (i.e. with InChanger set and that have the correct Storage device). * Search the Pool for a Volume with VolStatus=Append (if there is more than one, the Volume with the oldest date last written is chosen. If two have the same date then the one with the lowest MediaId is chosen). * Search the Pool for a Volume with VolStatus=Recycle and the InChanger flag is set true (if there is more than one, the Volume with the oldest date last written is chosen. If two have the same date then the one with the lowest MediaId is chosen). * Try recycling any purged Volumes. * Prune volumes applying Volume retention period (Volumes with VolStatus Full, Used, or Append are pruned). * Search the Pool for a Volume with VolStatus=Purged * If a Pool named "Scratch" exists, search for a Volume and if found move it to the current Pool for the Job and use it. Note, when the Scratch Volume is moved into the current Pool, the basic Pool defaults are applied as if it is a newly labeled Volume (equivalent to an update volume from pool command). * If we were looking for Volumes in the Autochanger, go back to step 2 above, but this time, look for any Volume whether or not it is in the Autochanger. * Attempt to create a new Volume if automatic labeling enabled If Python is enabled, a Python NewVolume event is generated before the Label Format directve is used. * Prune the oldest Volume if RecycleOldestVolume=yes (the Volume with the oldest LastWritten date and VolStatus equal to Full, Recycle, Purged, Used, or Append is chosen). This record ensures that all retention periods are properly respected. * Purge the oldest Volume if PurgeOldestVolume=yes (the Volume with the oldest LastWritten date and VolStatus equal to Full, Recycle, Purged, Used, or Append is chosen). We strongly recommend against the use of PurgeOldestVolume as it can quite easily lead to loss of current backup data. * Give up and ask operator. But it doesn't work that way. Volumes will not be purged until you reach maximum volumes. I can replicate this at all. I'm using 5 disksets in 3 different catalogs, and they all behave the same way. > They do recycle based on the retention periods as far as I know. If the > algorithm is not being followed, then I haven't seen clear proof of it. A > few people from time to time say "you see it doesn't work", but without > supplying all the necessary info. The problem is that the algorithm is rather > complex and most users either don't understand or don't read all the little > details. Sorry, Kern, but this isn't true. Recycling DOES work properly, but "create a new volume" is happening earlier in the decision process than the recycling. You have to hit max volumes to make recycling happen. -- Jo Rhett senior geek SVcolo : Silicon Valley Colocation ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users