Error in RunScript character substitution for storage

Martin Reissner <[email protected]>
Newsgroups gmane.comp.bacula.user
Message-ID <[email protected]>
Hello,

I'm using Bacula 15.0.2 from the community repository on a Debian 12 
server and I want to use the RunScript option to prune the Cloudcache 
after a Verifyjob. My Job config is as follows:

Job {
   Name = "replica-db-1-verify"
   Client = "replica-fd"
   VerifyJob = "replica-db-1"
   Type = Verify
   FileSet = "replica-db-1-fileset"
   Schedule = "replica-db-1-verify-schedule"
   Level = VolumeToCatalog
   Write Bootstrap = "/opt/bacula/working/replica-db-1-verify.bsr"
   Pool = "32days.Cloud010"
   Messages = Standard
   Priority = 10
   RunScript {
     Command = "sh -c \"echo cloud prune storage=%w pool=%p volume=%v | 
bconsole\""
     Runs On Success = Yes
     Runs On Failure = Yes
     Runs On Client = No
     Runs When  = After
   }
}

The error I get is this:

06-Dec 13:10 backup-dir JobId 139312: shell command: run AfterJob "sh -c 
"echo cloud prune storage=%w pool=32days.Cloud010 
volume=32days.Cloud010-9755 | bconsole""
06-Dec 13:10 backup-dir JobId 139312: AfterJob: Connecting to Director 
localhost:9101
06-Dec 13:10 backup-dir JobId 139312: AfterJob: 1000 OK: 10002 
backup-dir Version: 15.0.2 (21 March 2024)
06-Dec 13:10 backup-dir JobId 139312: AfterJob: Enter a period to cancel 
a command.
06-Dec 13:10 backup-dir JobId 139312: AfterJob: cloud prune storage=%w 
pool=32days.Cloud010 volume=32days.Cloud010-9755
06-Dec 13:10 backup-dir JobId 139312: AfterJob: Storage resource "%w": 
not found
06-Dec 13:10 backup-dir JobId 139312: AfterJob: The defined Storage 
resources are:
...


As you can see the %p for the pool and %v for the volume are substituted 
correctly but the %w for the storage is not and I can't figure out why 
and would be grateful for any suggestions. For now I'm pruning the whole 
pool after each Verifyjob even though the actual volume used would be 
enough.


Thanks,

Martin


-- 
Wavecon GmbH

Anschrift:      Thomas-Mann-Straße 16-20, 90471 Nürnberg
Website:        www.wavecon.de
Support:        [email protected]

Telefon:        +49 (0)911-1206581 (werktags von 9 - 17 Uhr)
Hotline 24/7:   0800-WAVECON
Fax:            +49 (0)911-2129233

Registernummer: HBR Nürnberg 41590
GF:             Cemil Degirmenci
UstID:          DE251398082


_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.