Hello @Nicholas,
Welcome to the Bacularis user group.
In the volume recycling I think the most important is to understand the retention matter.
Retention time
The retention for files (FileRetention
) defines how long the file records will be stored in the database. The file records are used for various purposes from which the most common is ability to do restore with selecting single files. If the file records for a job are pruned from the database after expiring the retention time, then restore is still possible, of course but it will be full job restore all files without selecting single files or directores.
The retention for jobs (JobRetention
) defines how long the job records will be stored in the database. Please note that when the job retention is expired and the job records are pruned in the database, then ALL file records that belong to this job are pruned as well.
The retention for volumes (VolumeRetention
) defines how long the volume records will be stored in the database. Please note that when the volume retention is expired and the volume records are pruned in the database, then ALL job records that are stored on this volume and ALL file records that belong to these jobs are pruned as well.
The above means that the reasonable is to set retentions with the following relation:
File Retention <= Job Retention <= Volume Retention
In your case, you set Job Retention to 180 days and the Volume Retention to 70 days that means the Job Retention will never be used because if volume will be recycled, then the job records (and file records) are automatically pruned as well.
Volume recycling
The volume recycling takes place for volumes marked with volume status Full
or Used
after expiring the volume retention time for volumes. The start time for counting volume retention is the time of last writting volume that changed volume status from Append
to Full/Used
.
[Append] => [Full/Used] => [Purged] => [Recycled] => [Append] ... and so on.
Please note that volume recycling does not remove volumes nor volume records from the database, it just reuse them from the beginning. You wrote that you have volumes on disk but not in the database. It can mean that they have been removed from the catalog for example by using delete
volume action in the Bacularis or delete volume=XYZ
Bconsole command. Can you confirm it?
To use these volumes back in Bacula, you may need to use bscan
tool to scan volumes for recreating the catalog records. If you no longer need these volumes, then better will be to just remove them since they have no longer "connection" with Bacula.
Volume limit
You wrote that volumes are not reused. I would propose to do two things:
- add volume limit to the pool (
Maximum Volumes
directive) directive to keep fixed number of volumes. In case automatic labeling Bacula prefers to create new volumes than reuse existing and setting the volume limit changes this behaviour.
- make sure if after setting the retention time in
Pool
resource, you ran update pool and update volumes from pool commands to apply the changes in Pool
for existing volumes. It can be done in Bacularis on the Pool details
page or directly in Bconsole.
Please let us know if it helped.
Good luck!
Best regards,
Marcin Haba (gani)