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 w...@protonmail.com
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users