Re: get Storage name
Bill Arlofski via Bacula-users <[email protected]>
| Newsgroups | gmane.comp.bacula.user |
|---|---|
| Message-ID | <[email protected]> |
On 1/23/25 1:04 PM, Christophe PEREZ via Bacula-users wrote:
> Hi,
>
> I need a little help.
> I can't figure out how to retrieve the Storage name by a bconsole
> command from the jobid or volume name. It's to process in a script
> launched at the end of the job.
> If you have any idea, thanks in advance.
>
> --
> Christophe PEREZ
Hello Christophe,
You can simply use a couple variables in a Runscript's `Command =` line.
To run and script at the end of a job, and to pass the pool name and storage name to that script, add a Runscript section to
your Job(s), or a JobDefs configuration like:
----8<----
Runscript {
RunsWhen = after
RunsOnClient = no
Command = "/path/to/script.sh %p %w"
}
----8<----
Keep in mind that these two variables only work when the command is run on the Director, hence `RunsOnClient = no` in the
example above.
You can find all of the variables that may be used in the `Messages Resource` section of the main manual.
Hope this helps,
Bill
--
Bill Arlofski
[email protected]
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users
signature.asc
(application/pgp-signature, 509 B)
-----BEGIN PGP SIGNATURE----- Version: ProtonMail wsBzBAEBCAAnBQJnkqVdCRBIDTDab9XDQBYhBMuLnlBaSQiuSUbb6UgNMNpv 1cNAAAATBwf+IDgmzRj1NSjjOBbhwIezCvxUw2i7fAxmFIFF8DcABI3CkNeT r3XAqDbVE4zcGFC1qIXE+Yv8OwFJQIumditwbcTJm2pwF+J4685HqrA/XOWk TSc1TATRXDVKC9qpJL7sJavEsYsDqmBdTJpFntSV7JC+r91oqVBssXBizh9A tyhS/6Fj6OdlI4JSQehaBkVTvlQSfizt5TjyA/ZK//fPqzLW+4Ej7lvzq87c s6OEkE+jZalMFBmIBjNLuRm/zJjPs6I5FopRvraS0juVAfgVf+Q4fXzDbl1X sRNgN94eCLV79IofM2PyLi4h+25gggZB8U/IwMAmH/07rWLfVT9MZQ== =btdT -----END PGP SIGNATURE-----