You're absolutely right, Admin Jobs doesn't like the RunScript section, I
replaced it with RunBeforeJob and RunAfterJob and it worked like a charm.
Thanks!
2011/4/15 Jeremy Maes <j...@schaubroeck.be>
> Op 14/04/2011 15:55, Rodrigo Renie Braga schreef:
>
> Hello list
>>
>> I've been trying to create an Admin Job to execute a script on the
>> director itself, but the Admin Job simply ignore the RunScript section. I
>> know that Admin Jobs can only run Director Script, not remote Client Script,
>> but my Client is the Director, so, what am I doing wrong?
>>
> *snip*
>
>
>> Job {
>> Name = job.admin
>> Client = client.ptibacula-dir
>> JobDefs = jobdef.default
>> Type = Admin
>>
>> RunScript {
>> RunsWhen = Before
>> FailJobOnError = Yes
>> Command = "/bin/myscript.sh"
>> }
>> }
>>
>> Have you tried running the before job with a "RunBeforeJob =
> "/bin/myscript.sh" yet? Maybe an Admin job doesn't like the RunScript
> directive. (mine are all with RunBeforeJob) The end result should be the
> same as the default is to fail the job on error.
>
>
> JobDefs {
>> Name = jobdef.default
>> Type = Backup
>> Write Bootstrap = "/var/lib/bacula/jobs/bootstrap.%c.%n.bsr"
>>
> Not sure if an admin job takes a "Write Bootstrap" directive. Though I
> think you should get an error when starting bacula if it doesn't. Same with
> Spool Data etc. Maybe you should try to take out the JobDefs in your Admin
> job definition and try by adding only the strictly necessary stuff like
> client, pool, type, name , messages and schedule (and the runbeforejob
> directive of course)
>
> FileSet = fs.default
>> Messages = msg.default
>> Pool = pool.default
>> Schedule = sch.default
>> Max Start Delay = 48h
>> Spool Data = yes
>> Allow Duplicate Jobs = no
>> Cancel Lower Level Duplicates = yes
>> }
>>
>>
>> P.S.: Documentation on Admin Jobs are really poor...
>> ists.sourceforge.net/lists/listinfo/bacula-users
>>
>
> **** DISCLAIMER ****
> http://www.schaubroeck.be/maildisclaimer.htm
>
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users