Hello folks, I'm using bacula 7.4.0 and trying to add RunScript to BackupCatalog job:
RunScript { Console = "prune expired volume yes" RunsWhen = Before } Full job configuration below: JobDefs { Name = "Standard backup" Type = Backup Level = Incremental FileSet = "Standard Set" Schedule = "WeeklyCycle" Storage = File Messages = Standard Max Full Interval = 40 days Pool = OfficeInc Full Backup Pool = OfficeFull Differential Backup Pool = OfficeDiff Incremental Backup Pool = OfficeInc Spool Attributes = yes Allow Duplicate Jobs = no Cancel Lower Level Duplicates = yes Priority = 10 Accurate = yes Write Bootstrap = "/var/lib/bacula/%c.bsr" } Job { Name = "BackupCatalog" JobDefs = "Standard backup" Level = Full FileSet = "Catalog" Client = besel-fd Schedule = "WeeklyCycleAfterBackup" RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup.pl MyCatalog" RunAfterJob = "/etc/bacula/scripts/delete_catalog_backup" Write Bootstrap = "/var/lib/bacula/%n.bsr" Priority = 50 RunScript { Console = "prune expired volume yes" RunsWhen = Before } } But job failed with following output: 08-Apr 02:43 besel-dir JobId 14931: shell command: run BeforeJob "/etc/bacula/scripts/make_catalog_backup.pl MyCatalog" 08-Apr 02:56 besel-dir JobId 14931: Start Backup JobId 14931, Job=BackupCatalog.2016-04-07_23.10.00_17 08-Apr 02:56 besel-dir JobId 14931: Created new Volume="OfficeFull-0341", Pool="OfficeFull", MediaType="File" in catalog. 08-Apr 02:56 besel-dir JobId 14931: Using Device "FileStorage-Dev1" to write. 08-Apr 02:56 besel-fd JobId 14931: shell command: run ClientBeforeJob "prune expired volume yes" 08-Apr 02:56 besel-fd JobId 14931: Error: Runscript: ClientBeforeJob returned non-zero status=208. ERR=No such file or directory 08-Apr 02:56 besel-dir JobId 14931: Fatal error: Bad response to RunBeforeNow command: wanted 2000 OK RunBeforeNow , got 2905 Bad RunBeforeNow command. Seems bacula is trying to run "prune expired volume yes" as shell command, but as I understand from the docs this command should run as bacula console command on the director. For the test I added additional job with Type=Admin and place RunScript in it - seems running without error. But I do not see console output in the job. So how runscript should be used in my case? -- WBR, Andrey Tataranovich ------------------------------------------------------------------------------ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users