Truncate Bacula Volumes to Free Disk Space

Bacula’s standard behavior for recycling volumes on disk is to preserve them as long as possible. Even if your retention time expires, Bacula will only overwrite their information (truncate) when a new backup needs volumes to write and there are no other blank volumes (for example) in the same Pool.

This behavior may be uncomfortable for some admins as it becomes more difficult to know how much space the necessary stored backups occupy, or expired volumes from a Pool may be taking up a space that would be useful for writing backups from other Pools.

Therefore, it is possible to configure Bacula to automatically perform volume truncation (cleaning), freeing space at the moment the next commands are executed. You can use an Admin Job (unique to run scripts) or any other Job, as follows:

Job {
  ...
  Type=Admin
  RunScript {
    Console = "prune expired volume yes"
    Console = "truncate pool=Diaria storage=File1"
    RunsWhen = Before
    RunsOnFailure = yes
    RunsOnClient = no
  }
}

 

Disponível em: pt-brPortuguês (Portuguese (Brazil)) enEnglish esEspañol (Spanish)

Leave a Reply

Close Menu