Bacula-users

Re: [Bacula-users] RunScript order of multiple Commands

2015-05-11 09:47:44
Subject: Re: [Bacula-users] RunScript order of multiple Commands
From: Ana Emília M. Arruda <emiliaarruda AT gmail DOT com>
To: Luc Van der Veken <lucvdv AT wimionline DOT com>
Date: Mon, 11 May 2015 10:45:30 -0300
Yes luc, command 2 will be executed if command 1 fails.

This is only a "join" of separate runscript resources:

RunScript {
   RunsWhen = Before
   FailJobOnError = No
   Command = "/etc/bacula/script_1.sh"
 }

RunScript {
   RunsWhen = Before
   FailJobOnError = No
   Command = "/etc/bacula/script_3.sh"
}

RunScript {
   RunsWhen = Before
   FailJobOnError = No
   Command = "/etc/bacula/script_2.sh"
}

Best regards,
Ana

On Mon, May 11, 2015 at 10:16 AM, Luc Van der Veken <lucvdv AT wimionline DOT com> wrote:

At the risk of sounding overly obvious ---  ;)

 

If you want to be absolutely certain, you can always take full control yourself: put the commands in a shell script, and execute that with a single Command line.

 

Otherwise more questions arise, for instance if you have ‘FailJobOnError = yes’, will command 2 still be executed if command 1 fails?

 

 

From: Alex Domoradov [mailto:alex.hha AT gmail DOT com]
Sent: 11 May 2015 14:17
To: ZeroUno
Cc: bacula-users
Subject: Re: [Bacula-users] RunScript order of multiple Commands

 

> Or are they executed in the order in which they are written in the
configuration, with the second waiting for the first to complete and so on?

it's seem so

RunScript {
   RunsWhen = Before
   FailJobOnError = No
   Command = "/etc/bacula/script_1.sh"
   Command = "/etc/bacula/script_3.sh"
   Command = "/etc/bacula/script_2.sh"
}

# cat /etc/bacula/script_1.sh
#!/bin/bash
echo "command 1, $(date)" >> /tmp/1.log
sleep 60

# cat /etc/bacula/script_2.sh
#!/bin/bash
echo "command 2, $(date)" >> /tmp/1.log
sleep 120

# cat /etc/bacula/script_3.sh
#!/bin/bash
echo "command 3, $(date)" >> /tmp/1.log
sleep 240

# cat /tmp/1.log
command 1, Mon May 11 12:08:49 UTC 2015
command 3, Mon May 11 12:09:49 UTC 2015
command 2, Mon May 11 12:13:49 UTC 2015

 

 

 

On Mon, May 11, 2015 at 1:21 PM, ZeroUno <zerozerounouno AT gmail DOT com> wrote:

Hi,
I'm using bacula 5.2.13 on RedHat 6.3 (cannot change version), and I
have a very basic question to which I cannot find an answer online.

In the description of the RunScript directive I read that you can
specify more than one Command option per RunScript.
But when you do it, in which order are the different Commands executed?
Are they executed in random order, maybe even simultaneously?
Or are they executed in the order in which they are written in the
configuration, with the second waiting for the first to complete and so on?

Thank you.

--
01


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

 


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users