Thanks a lot.
Like an idiot I was looking at the 5.1 settings on
https://www.bacula.org/5.1.x-manuals/de/main/main/Configuring_Director.html
which only gives:
%c = Client's name
%d = Director's name
%e = Job Exit Status
%i = JobId
%j = Unique Job id
%l = Job Level
%n = Job name
%s = Since time
%t = Job type (Backup, ...)
%v = Volume name (Only on director side)

Sorry for the noise.

Le jeudi 23 janvier 2025 à 20:23 +0000, Bill Arlofski via Bacula-users
a écrit :
> 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
> 

-- 
Christophe PEREZ


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

Reply via email to