Arno Lehmann schrieb: > [...] > I haven't done much experimenting with a scratch pool recently. But I > do recall there are more or less philosophical discussions from time > to time. > > The key question is: In a situation you describe, is using a scratch > volume the right move?
Not in my understanding of the manual and experience of the last 8 months when I set up bacula. And baucla 2.0.3 is still working as expected, see below for more details. > Bacula simply tries to keep usable data as long as possible. In this > case, as the volume from Diff pool is not yet pruned, using a scratch > volume is a way to achieve this. > > I would have to re-read the manual chapters on recycling very > carefully to compare the behaviour you observe with the documentation... I *think* step 5 should happen before step 7. And it's happening exactly in the other way here. http://www.bacula.org/rel-manual/Automatic_Volume_Recycling.html 1. 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). 2. 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). 3. 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). 4. Try recycling any purged Volumes. 5. Prune volumes applying Volume retention period (Volumes with VolStatus Full, Used, or Append are pruned). Note, even if all the File and Job records are pruned from a Volume, the Volume will not be marked Purged until the Volume retention period expires. 6. Search the Pool for a Volume with VolStatus=Purged 7. 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). 8. 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. 9. 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. If the maximum number of Volumes specified for the pool is reached, a new Volume will not be created. 10. 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. 11. 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. 12. Give up and ask operator. > But I would expect Bacula to recycle the used volume if there is no > other usable volume *in the autochanger*. I.e., first make sure > backups continue, so prefer volumes in the autochanger. If the scratch > volume was in the autochanger, using that looks ok to me. If this would be a fresh install with a new config, I'd consider a config error. But this setup ist mostly unchanged for 8 months. This volume and other volumes were correctly pruned/recycled before. The Scratch pool was there all the time. 30-Aug 18:05 VU0EM005-dir: Pruned 3 Jobs on Volume "06D126L3" from catalog. 30-Aug 18:05 VU0EM005-dir: Recycled volume "06D126L3" 18-Okt 18:05 VU0EM005-dir: Pruned 3 Jobs on Volume "06D126L3" from catalog. 18-Okt 18:05 VU0EM005-dir: Recycled volume "06D126L3" 18-Okt 18:05 VU0EM005-dir: Pruned 3 Jobs on Volume "06D127L3" from catalog. 25-Okt 18:05 VU0EM005-dir: Recycled volume "06D127L3" 20-Sep 18:05 VU0EM005-dir: Pruned 3 Jobs on Volume "06D137L3" from catalog. 27-Sep 18:05 VU0EM005-dir: Recycled volume "06D137L3" 01-Nov 18:05 VU0EM005-dir: Pruned 3 Jobs on Volume "06D137L3" from catalog. 15-Nov 18:05 VU0EM005-dir: Recycled volume "06D137L3" 04-Jul 18:05 VU0EM005: Pruned 3 Jobs on Volume "06D125L3" from catalog. 12-Jul 18:05 VU0EM005: Recycled volume "06D125L3" 16-Aug 18:05 VU0EM005-dir: Pruned 3 Jobs on Volume "06D125L3" from catalog. 23-Aug 18:05 VU0EM005-dir: Recycled volume "06D125L3" 04-Okt 18:05 VU0EM005-dir: Pruned 3 Jobs on Volume "06D125L3" from catalog. 04-Okt 18:05 VU0EM005-dir: Recycled volume "06D125L3" All of this was working *as I expected* in the last months. But I updated from 2.0.3 to 2.2.6 this monday because of an other problem (other message). As a test I've now restarted 2.0.3 and look, it's working again! *status dir days=3 Scheduled Jobs: Level Type Pri Scheduled Name Volume =================================================================================== Differential Backup 10 25-Nov-07 00:05 SMTCZB0003 06D125L3 Differential Backup 10 25-Nov-07 00:06 VU0EM003 06D125L3 Full Backup 10 25-Nov-07 00:07 BackupCatalog 06D125L3 ==== You have messages. *mess 23-Nov 08:51 VU0EM005-dir: Pruned 3 Jobs on Volume "06D126L3" from catalog. 23-Nov 08:51 VU0EM005-dir: Pruned 3 Jobs on Volume "06D125L3" from catalog. 23-Nov 08:51 VU0EM005-dir: Recycled volume "06D125L3" No Scratch pool volume was used, pruning happend as expected and the volume 06D125L3 was recycled. Great! I know that there were changes between 2.0.x and 2.2.x regarding pruning/recycling. But this is a bit of a show-stopper for me. Maybe this is how it should work _now_, but this breaks my whole concept :( Ralf ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Bacula-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-users
