On 11/25/22 09:20, Ana Emília M. Arruda wrote:
Can you share your pool resource configuration here? Bacula has many directives to different ways to recycle volumes, it would be nice to see how you have the pool configured.

Sure, here is my pool configuration:

Pool {
  Name = File
  Pool Type = Backup
  Recycle = yes
  Recycle Oldest Volume = yes
  AutoPrune = yes
  Volume Retention = 7 days
  Maximum Volume Bytes = 50G
  Maximum Volumes = 310
  Label Format = "Vol-"
  Action On Purge = Truncate
  Volume Use Duration = 14h
}

It's notable that this configuration leaves about 450GB of free space on the pool partition, so there is plenty of working room. I had initially grown the Maximum Volumes setting several times before stopping and investigating why volumes weren't being reused; presuming that completely filling the partition would likely be A Bad Idea(tm).

    After that, you will be able to "truncate volumes in Purged
    status" using the following command:

    * truncate volume allpools storage=File1

    This command reports "No volumes found to perform the command"

This command will only apply to volumes in "Purged" status. If they have been reused, there will be no volume to truncate. Please check if it works having at least one volume in Purged status.

After the steps taken so far, I'm showing that I have a significant number of volumes in "Purged" status - so, if I understand correctly, those will be available for re-use as Bacula requires more space for more backups.

    So; with your help I see how to manually prune files, but this
    seems inelegant. The system should automatically be pruning or at
    least allowing me to overwrite the old data - it ought to be
    cyclical - use the available disk space (17T) to back up systems,
    letting old backups fall off automatically so that new backups can
    take their place.

    Is needing to manually remove stale backups the intended behavior
    of the system, or have I done something incorrectly?

Bacula will automatically reuse volumes, but it will not destroy data if the retention hasn't expired yet. It would be nice if you could share the pool resource configuration and a job log reporting no volume available to use. The best approach is to reuse volumes as soon as they have retention expired,  but to not keep the pool too tight as it may happen Bacula can't create a new volume or reuse any. Limiting the pool size (in bytes or in number of volumes) and keeping a retention that can fit into this pool size is ideal.

The pool configuration is listed above, here's an example of a job log reporting no volumes available (this is before files were purged allowing the currently pending backups to run - they all finished)

2022-11-23 13:01:31 baculaserver-dir JobId 904: Start Backup JobId 904, Job=client.2022-11-23_13.01.29_31 2022-11-23 13:01:31 baculaserver-dir JobId 904: Connected to Storage "File1" at baculaserver:9103 with TLS 2022-11-23 13:01:31 baculaserver-dir JobId 904: Pruning oldest volume "Vol-0001" 2022-11-23 13:01:31 baculaserver-dir JobId 904: Found no Job associated with the Volume "Vol-0001" to prune 2022-11-23 13:01:31 baculaserver-dir JobId 904: Using Device "FileChgr1-Dev1" to write. 2022-11-23 13:01:31 baculaserver-dir JobId 904: Connected to Client "client" at IPADDR:9102 with TLS 2022-11-23 13:01:31 client JobId 904: Connected to Storage at baculaserver:9103 with TLS 2022-11-23 13:01:32 baculaserver-dir JobId 904: Pruning oldest volume "Vol-0001" 2022-11-23 13:01:32 baculaserver-dir JobId 904: Found no Job associated with the Volume "Vol-0001" to prune 2022-11-23 13:01:32 baculaserver-dir JobId 904: Pruning oldest volume "Vol-0001" 2022-11-23 13:01:32 baculaserver-dir JobId 904: Found no Job associated with the Volume "Vol-0001" to prune 2022-11-23 13:01:32 baculaserver-sd JobId 904: Job client.2022-11-23_13.01.29_31 is waiting. Cannot find any appendable volumes.
Please use the "label" command to create a new Volume for:
    Storage:      "FileChgr1-Dev1" (/var/lib/bacula)
    Pool:         File
    Media type:   File1
2022-11-23 13:03:47 baculaserver-sd JobId 904: Error: bsock.c:282 Bsock send while terminated=1 on call to client:IPADDR:9103 2022-11-23 13:03:47 baculaserver-sd JobId 904: askdir.c:859 Job was stopped by the user.

Thanks,

--
---------------------------------
-  Nick Bright                  -
-  KwiKom Communications        -
-  Office 800-379-7292          -
-  Direct 620-228-5653          -
-  Webhttps://www.kwikom.com/   -
---------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to