From: Mantis B. T. <no...@bu...> - 2013-04-26 15:51:54
|
A NOTE has been added to this issue. ====================================================================== http://bugs.bacula.org/view.php?id=2000 ====================================================================== Reported By: ensc Assigned To: ====================================================================== Project: bacula Issue ID: 2000 Category: Director Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2013-04-24 14:01 BST Last Modified: 2013-04-26 16:51 BST ====================================================================== Summary: Volumes are not taken from Scratch Pool Description: In the setup below, I expect that: 1. old volumes are moved into _recycle-incremental.newport.e 2. when new volumes are required, they are taken from _recycle-incremental.newport.e Unfortunately, only point 1. applies and the recycle pool grows and grows. When 'incremental.newport.e' needs a new volume, a new one will be created but not taken from the scratch pool. I use this setup because I want to limit the total number of volumes. E.g. I am using disk based volumes and there can be created more than one volume per backup in rare situations. With a traditional setup (no recycle/scratch) pool, the normal pool would get more and more volumes which are difficultly to distinguish. With the pool -> recycle -> pool setup, I wanted to move old volumes to the _recycle pool and clean up the recycle pool from time to time manually. -------------------- Pool { Name = "incremental.newport.e" Pool Type = Backup Storage = "storage-newport.e" Recycle = yes AutoPrune = yes Label Format = "INC-" Volume Use Duration = 23 hours Volume Retention = 1 month Action On Purge = Truncate Scratch Pool = "_recycle-incremental.newport.e" Recycle Pool = "_recycle-incremental.newport.e" #Recycle Pool = "incremental.newport.e" } Pool { Name = "_recycle-incremental.newport.e" Pool Type = Backup Storage = "storage-newport.e" Recycle = yes AutoPrune = yes Action On Purge = Truncate Purge Oldest Volume = yes Volume Use Duration = 1 hour Volume Retention = 1 hour } -------------------- Additional Information: llist media pool=_recycle-incremental.newport.e MediaId: 417 VolumeName: INC-0417 Slot: 0 PoolId: 119 MediaType: File FirstWritten: 2012-11-12 00:02:18 LastWritten: 2012-11-12 00:03:16 LabelDate: 2012-11-12 00:02:18 VolJobs: 4 VolFiles: 0 VolBlocks: 99 VolMounts: 2 VolBytes: 6144506 VolErrors: 0 VolWrites: 100 VolCapacityBytes: 0 VolStatus: Purged Enabled: 1 Recycle: 1 VolRetention: 2592000 VolUseDuration: 82800 MaxVolJobs: 0 MaxVolFiles: 0 MaxVolBytes: 0 InChanger: 0 EndFile: 0 EndBlock: 6144505 VolParts: 0 LabelType: 0 StorageId: 8 DeviceId: 0 LocationId: 0 RecycleCount: 0 InitialWrite: 0 ScratchPoolId: 0 RecyclePoolId: 119 Comment: NULL ====================================================================== ---------------------------------------------------------------------- (0006667) ensc (reporter) - 2013-04-24 14:15 http://bugs.bacula.org/view.php?id=2000#c6667 ---------------------------------------------------------------------- PoolId: 64 Name: incremental.newport.e NumVols: 27 MaxVols: 0 UseOnce: 0 UseCatalog: 1 AcceptAnyVolume: 0 VolRetention: 2592000 VolUseDuration: 82800 MaxVolJobs: 0 MaxVolBytes: 0 AutoPrune: 1 Recycle: 1 PoolType: Backup LabelFormat: INC- Enabled: 1 ScratchPoolId: 119 RecyclePoolId: 119 LabelType: 0 PoolId: 119 Name: _recycle-incremental.newport.e NumVols: 113 MaxVols: 0 UseOnce: 0 UseCatalog: 1 AcceptAnyVolume: 0 VolRetention: 3600 VolUseDuration: 3600 MaxVolJobs: 0 MaxVolBytes: 0 AutoPrune: 1 Recycle: 1 PoolType: Backup LabelFormat: * Enabled: 1 ScratchPoolId: 0 RecyclePoolId: 0 LabelType: 0 ---------------------------------------------------------------------- (0006668) gani (reporter) - 2013-04-25 20:15 http://bugs.bacula.org/view.php?id=2000#c6668 ---------------------------------------------------------------------- Described behaviour when Scratch Pool is not used at all, may be caused that you do not have Maximum Volumes directive in your Pool named "incremental.newport.e". This Pool uses Label Format directive that in situation when backup needs some tape then there is provided new tape by labeling instead of take tape from Scratch Pool. So, you can set Maximum Volumes directive and then try the Scratch Pool functionality. Regards Marcin Haba (gani) ---------------------------------------------------------------------- (0006669) ensc (reporter) - 2013-04-26 12:35 http://bugs.bacula.org/view.php?id=2000#c6669 ---------------------------------------------------------------------- Defining the number of maximum volumes is difficult. E.g. I want to be able to restore files from the last 30 days, but I do not know whether one backup job needs 1, 10 or 50 volumes (in usual case, there is only one volume used, but due to splitting or so, this can become more). Nevertheless, setting maximum volumes to 100 (assuming there are not used more than 3 volumes in average per day and rounding up a little bit) does not fix the issue. There is still created a new volume. ---------------------------------------------------------------------- (0006670) gani (reporter) - 2013-04-26 14:59 http://bugs.bacula.org/view.php?id=2000#c6670 ---------------------------------------------------------------------- For easier defining the number of maximum volumes you can set Maximum Volume Jobs directive. You can also compute maximum volumes count for retaining files from the last 30 days. eg: Volume Retention period Maximum Volumes (for pool) = ---------------------------------------------------------------------------------- + 1 Maximum Volume Jobs * time interval between backups How many volumes do you have in the pool named "incremental.newport.e"? If you have less than 100 and you want to use Scratch Pool, then you need to set value equal to current volumes count for this pool. Next you should update pool resource by Bacula console. Regards. Marcin Haba (gani) ---------------------------------------------------------------------- (0006671) ensc (reporter) - 2013-04-26 16:03 http://bugs.bacula.org/view.php?id=2000#c6671 ---------------------------------------------------------------------- I want to be able to identify "dead" volumes (e.g. volumes with files outside the 30 days window) easily. It can happen, that there are >100 INC-xxx volumes which are required to restore files from the 30 days window, or only 30 (indeed, it are a little bit less due to differential/full backups running instead of incremental one) in ideal case. When there are 30 volumes, I want to cleanup the system by truncating/removing the other 70 ones. Your formula does not help because it uses (changing) statistics from the past. E.g. when setting maximum volumes to '30', this might remove volumes containing files from 25 days ago, won't it? ---------------------------------------------------------------------- (0006672) gani (reporter) - 2013-04-26 16:51 http://bugs.bacula.org/view.php?id=2000#c6672 ---------------------------------------------------------------------- I think (if I good understood you) that your need is to solve by recycle process. So, I have two questions: 1. What do you exactly need to determine? a. Maximum Volumes b. Volume Retention c. Maximum Volume Jobs 2. How did you compute 25 days? What was your unknown value in formula? Regards. Marcin Haba (gani) Issue History Date Modified Username Field Change ====================================================================== 2013-04-24 14:01 ensc New Issue 2013-04-24 14:15 ensc Note Added: 0006667 2013-04-25 20:15 gani Note Added: 0006668 2013-04-26 12:35 ensc Note Added: 0006669 2013-04-26 14:58 gani Note Added: 0006670 2013-04-26 14:59 gani Note Edited: 0006670 2013-04-26 14:59 gani Note Edited: 0006670 2013-04-26 14:59 gani Note Edited: 0006670 2013-04-26 14:59 gani Note Edited: 0006670 2013-04-26 16:03 ensc Note Added: 0006671 2013-04-26 16:51 gani Note Added: 0006672 ====================================================================== |