Sorry, this message was to large to get to the list. Just a suggestion to update documentation regarding purge/truncate commands...
Regards, Ziga

On 30.12.2020 21:32, Žiga Žvan wrote:

Hello Heitor,

I have admin job (output bellow). I have followed instructions in bacula 9.6.x manual (page 228 of https://www.bacula.org/9.6.x-manuals/en/main/main.pdf).
After some testing I discovered that:
a)command "prune expired volume yes" changes the status of volume to purged and allows volume to be used again (data on disk does not change) b)command "purge volume action=all allpools storage=FSOciCloudStandardChanger" does not do anything.

I have changed this command to "truncate AllPools storage=FSOciCloudStandardChanger" as indicated on link you provided. Now data on disk actually gets truncated.

Thank you for all your help.
Perhaps someone could update documentation. I think it is quite misleading.

Regards,
Ziga

PS: Because of my changes to SD conf, I got error on truncate command (is a directory...). I have reinitialized catalog database to solve this.


Job {
  Name = "BackupCatalog"
  JobDefs = "CatalogJob"
  Level = Full
  FileSet="Catalog"
  Schedule = "WeeklyCycleAfterBackup"
  # This creates an ASCII copy of the catalog
  # Arguments to make_catalog_backup.pl are:
  #  make_catalog_backup.pl <catalog-name>
  RunBeforeJob = "/opt/bacula/scripts/make_catalog_backup.pl MyCatalog"
  # This deletes the copy of the catalog
  RunAfterJob  = "/opt/bacula/scripts/delete_catalog_backup"
  #Prune
  RunScript {
    Console = "prune expired volume yes"
    RunsWhen = Before
    RunsOnClient= No
  }
  #Purge
  RunScript {
    RunsWhen=After
    RunsOnClient=No
    Console = "purge volume action=all allpools storage=FSOciCloudStandardChanger"
  }
  Write Bootstrap = "/opt/bacula/working/%n.bsr"
  Priority = 11                   # run after main backup
}

*truncate pool=jhost05-weekly-pool storage=FSOciCloudStandardChanger
Using Catalog "MyCatalog"
Connecting to Storage daemon FSOciCloudStandardChanger at 192.168.66.35:9103 ... 3929 Unable to open device ""FSOciCloudStandard1" (/mnt/ocisg/bacula/backup)": ERR=file_dev.c:190 Could not open(/mnt/ocisg/bacula/backup/jhost05-weekly-vol- 0475,CREATE_READ_WRITE,0640): ERR=Is a directory



On 30.12.2020 14:01, Heitor Faria wrote:

Hello Ziga,

If you are using AutoPrune=No, you must automate some sort of routine to prune expired volumes, otherwise it will affect Bacula's capability of recycling volumes. You can achieve that (e.g.) using an Admin Job and the prune expired command, such as in: https://www.bacula.lat/truncate-bacula-volumes-to-free-disk-space/?lang=en

Regards,
--
MSc Heitor Faria
CEO Bacula LatAm
mobile1: + 1 909 655-8971
mobile2: + 55 61 98268-4220

América Latina
[ http://bacula.lat/]

...


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to