Hello,

pt., 1 lis 2019 o 21:34 Phil Stracchino <[email protected]> napisał(a):

> I have created a new admin job which is defined as follows:
>
> Job {
>   Name = "Archive Full Backups"
>   Type = Admin
>   Enabled = Yes
>   Pool = Scratch
>   Fileset = Dummy
>   Storage = asgard-file
>   Client = asgard
>   Level = Full
>   ClientRunBeforeJob = "/etc/bacula/archive_backup"
>   Messages = Daemon
>   Priority = 20
>   Rerun Failed Levels = yes
>   Allow Duplicate Jobs = no
>   Cancel Queued Duplicates = yes
>   Schedule = "Full Backup Archive"
> }
>
>
> Note the Level resource is present and set to Full.  I've just restarted
> the Director.
>

I think the Admin job has no level variants and level parameter is simply
ignored during run.
The Level=... parameter is required for every job, so it is for Admin.
Additionally you can't use the ClientRunBeforeJob in Admin Job resource,
see my comments below.


>
> When I try to run this job manually from BAT, the Level field in the RUN
> JOB dialog is empty and contains no selectable values.  It gets launched
> as follows:
>
> run job="Archive Full Backups" fileset="Dummy" level="" client="asgard"
> pool="Full-Disk" storage="asgard-file" priority="10" when="2019-11-01
> 15:52:49" yes
>
> And this causes it to fail because the level is empty.
>

Well it seems that it could be an issue with BAT as it should omit a
level="" parameter when executing an Admin Job. If you commit this issue,
could you fill it in the bugs.bacula.org? Thank you.


>
> A different admin job that runs against the same server, defined as
> follows, has been working perfectly for years:
>
> Job {
>   Name = "Clean Expired Volumes"
>   Type = Admin
>   Enabled = Yes
>   Pool = Scratch
>   FileSet = Dummy
>   Storage = asgard-file
>   Client = asgard
>   Level = Full
>   RunBeforeJob = "/etc/bacula/clean_volumes -v"
>   Messages = Daemon
>   Priority = 20
>   Rerun Failed Levels = yes
>   Allow Duplicate Jobs = no
>   Cancel Queued Duplicates = yes
>   Schedule = "Volume Cleanup"
> }
>
>
Does it run when executed manually from BAT in the same way as your new job?


>
> The only differences between the two jobs are the schedule they run on,
> the script they execute, and where they execute it.


What do you mean by "where" above?

The Admin job is executed on Director only (Main Reference Manual, The Job
Resource):
"*An Admin job can be used to periodically run catalog pruning, if you do
not want to do it at the end of each Backup Job. Although an Admin job is
recorded in the catalog, very little data is saved. The Client is not
involved in an Admin job, so features such as “Client Run Before Job” are
not available. Only Director’s runscripts will be executed.*"


>   Does anyone have
> any guesses at why the first job is being run with an empty Level?
>

AFIK, you can't execute a job with an empty level parameter, but you can
execute it with default job level when you omit the level=... option in
"run ..." command.


>
> When run from bconsole, the job runs without errors but does nothing:
>
> *messages
> 01-Nov 16:13 minbar-dir JobId 23242: Start Admin JobId 23242,
> Job=Archive_Full_Backups.2019-11-01_16.13.51_08
> 01-Nov 16:13 minbar-dir JobId 23242: Bacula 9.4.4 (28May19): 01-Nov-2019
> 16:13:53
>   JobId:                  23242
>   Job:                    Archive_Full_Backups.2019-11-01_16.13.51_08
>   Scheduled time:         01-Nov-2019 16:13:48
>   Start time:             01-Nov-2019 16:13:53
>   End time:               01-Nov-2019 16:13:53
>   Termination:            Admin OK
>
>
> I seem to recall having run into this problem before, of ClientRun...
> not working.  Can anyone shed any light?
>

The ClientRun... is not working with Admin Jobs as it is executed on
Director only (check my comment above).

best regards
-- 
Radosław Korzeniewski
[email protected]
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to