[Bacula-users] Multiple commands in RunScript possible?
Hi all! Following question - is it possible to run multiple commands with RunScript on client side? I.e. RunScript { RunsWhen = Before FailJobOnError = Yes Command = /etc/init.d/someservice stop; lvcreate -s -n myservicebackup /dev/mylv/servicelv; /etc/init.d/someservice start RunsOnClient = yes } I tested such Definition, but only the first commans was executed - someservice stop. All other have been ignored (?). What i done now is, i defined multiple RunScript-Definitions and arranged them in the order i need: RunScript { RunsWhen = Before FailJobOnError = Yes Command = /etc/init.d/someservice stop RunsOnClient = yes } RunScript { RunsWhen = Before FailJobOnError = Yes Command = lvcreate -s -n myservicebackup /dev/mylv/servicelv RunsOnClient = yes } RunScript { RunsWhen = Before FailJobOnError = Yes Command = /etc/init.d/someservice start RunsOnClient = yes } 1. Question - is it possible to define multiple commands? 2. Question - is such hack - definition of multiple RunScripts ok? Thanks in advance! Mit freundlichen Grüßen Vladimirs Vecgailis -- == Vladimirs Vecgailis Second Level IT primacall Vertriebs-GmbH Postfach 08 04 55 10004 Berlin Leipziger Str. 124 10117 Berlin GERMANY Phone +49 30 206143 875 eMail [EMAIL PROTECTED] Web http://www.primacall.de == Amtsgericht und Sitz: Berlin, HRB 98348 B Steuernummer: 37-199-20919 Geschäftsführer: M. Vukusic Die in dieser E-Mail enthaltenen Informationen sind vertraulich und können rechtlich bedeutsam sein. Sie sind ausschließlich für den Adressaten bestimmt und jeglicher Zugriff durch andere Personen ist unzulässig. Falls Sie nicht der beabsichtigte Empfänger sind, ist jegliche Veröffentlichung, Verteilung oder sonstige in diesem Zusammenhang stehende Handlung untersagt und unter Umständen rechtswidrig. Herkömmliche E-Mails sind zudem nicht gegen Zugriff geschützt und können mit und ohne Einfluss von Dritten verloren gehen, verändert oder verfälscht werden. Eine Haftung für die Unversehrtheit von E-Mails oder hieraus entstandene Schäden kann daher nicht übernommen werden. The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee and access to the e-mail by anyone else is prohibited. If you are not the intended recipient, any disclosure, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Common e-mails are not protected against access by third persons and therefore might be lost, changed or falsified, with or without any interference by third persons. We cannot accept any responsibility for the integrity of e-mails or for any damages resulting out of these circumstances. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Multiple commands in RunScript possible?
I would recommend using a bash script to achieve these, the reason your ';'s aren't working is that ';' is an interpreted command, something bacula does not understand. Sincerely, -Michael On 11/14/07, Vladimirs Vecgailis [EMAIL PROTECTED] wrote: Hi all! Following question - is it possible to run multiple commands with RunScript on client side? I.e. RunScript { RunsWhen = Before FailJobOnError = Yes Command = /etc/init.d/someservice stop; lvcreate -s -n myservicebackup /dev/mylv/servicelv; /etc/init.d/someservice start RunsOnClient = yes } I tested such Definition, but only the first commans was executed - someservice stop. All other have been ignored (?). What i done now is, i defined multiple RunScript-Definitions and arranged them in the order i need: RunScript { RunsWhen = Before FailJobOnError = Yes Command = /etc/init.d/someservice stop RunsOnClient = yes } RunScript { RunsWhen = Before FailJobOnError = Yes Command = lvcreate -s -n myservicebackup /dev/mylv/servicelv RunsOnClient = yes } RunScript { RunsWhen = Before FailJobOnError = Yes Command = /etc/init.d/someservice start RunsOnClient = yes } 1. Question - is it possible to define multiple commands? 2. Question - is such hack - definition of multiple RunScripts ok? Thanks in advance! Mit freundlichen Grüßen Vladimirs Vecgailis -- == Vladimirs Vecgailis Second Level IT primacall Vertriebs-GmbH Postfach 08 04 55 10004 Berlin Leipziger Str. 124 10117 Berlin GERMANY Phone +49 30 206143 875 eMail [EMAIL PROTECTED] Web http://www.primacall.de == Amtsgericht und Sitz: Berlin, HRB 98348 B Steuernummer: 37-199-20919 Geschäftsführer: M. Vukusic Die in dieser E-Mail enthaltenen Informationen sind vertraulich und können rechtlich bedeutsam sein. Sie sind ausschließlich für den Adressaten bestimmt und jeglicher Zugriff durch andere Personen ist unzulässig. Falls Sie nicht der beabsichtigte Empfänger sind, ist jegliche Veröffentlichung, Verteilung oder sonstige in diesem Zusammenhang stehende Handlung untersagt und unter Umständen rechtswidrig. Herkömmliche E-Mails sind zudem nicht gegen Zugriff geschützt und können mit und ohne Einfluss von Dritten verloren gehen, verändert oder verfälscht werden. Eine Haftung für die Unversehrtheit von E-Mails oder hieraus entstandene Schäden kann daher nicht übernommen werden. The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee and access to the e-mail by anyone else is prohibited. If you are not the intended recipient, any disclosure, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Common e-mails are not protected against access by third persons and therefore might be lost, changed or falsified, with or without any interference by third persons. We cannot accept any responsibility for the integrity of e-mails or for any damages resulting out of these circumstances. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Multiple commands in RunScript possible?
resending to list, too -- On 2007.11.14. 16:13, Vladimirs Vecgailis wrote: Hi all! Following question - is it possible to run multiple commands with RunScript on client side? I.e. RunScript { RunsWhen = Before FailJobOnError = Yes Command = /etc/init.d/someservice stop; lvcreate -s -n myservicebackup /dev/mylv/servicelv; /etc/init.d/someservice start i would suggest using a script (i was doing that in a very similar scenario). script would also take care of any errors and could return nicely desired code for bacula to decide whether backup should proceed or not. it would also make sure that, if snapshot creation fails, service is started again (which might not happen in the second configuration). obviously, don't forget runafter job which removes the snapshot (unless for some reason it will be kept) RunsOnClient = yes } I tested such Definition, but only the first commans was executed - someservice stop. All other have been ignored (?). What i done now is, i defined multiple RunScript-Definitions and arranged them in the order i need: RunScript { RunsWhen = Before FailJobOnError = Yes Command = /etc/init.d/someservice stop RunsOnClient = yes } RunScript { RunsWhen = Before FailJobOnError = Yes Command = lvcreate -s -n myservicebackup /dev/mylv/servicelv RunsOnClient = yes } RunScript { RunsWhen = Before FailJobOnError = Yes Command = /etc/init.d/someservice start RunsOnClient = yes } 1. Question - is it possible to define multiple commands? 2. Question - is such hack - definition of multiple RunScripts ok? ... -- Rich - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Multiple commands in RunScript possible?
On Wed, 14 Nov 2007 08:22:36 -0600 Michael Short [EMAIL PROTECTED] wrote: I would recommend using a bash script to achieve these, the reason your ';'s aren't working is that ';' is an interpreted command, something bacula does not understand. Sincerely, -Michael Thanks to all for the answers. Well, ok, if bacula can't handle it... i'll create a script... Cheers! Mit freundlichen Grüßen Vladimirs Vecgailis -- == Vladimirs Vecgailis Second Level IT primacall Vertriebs-GmbH Postfach 08 04 55 10004 Berlin Leipziger Str. 124 10117 Berlin GERMANY Phone +49 30 206143 875 eMail [EMAIL PROTECTED] Web http://www.primacall.de == Amtsgericht und Sitz: Berlin, HRB 98348 B Steuernummer: 37-199-20919 Geschäftsführer: M. Vukusic Die in dieser E-Mail enthaltenen Informationen sind vertraulich und können rechtlich bedeutsam sein. Sie sind ausschließlich für den Adressaten bestimmt und jeglicher Zugriff durch andere Personen ist unzulässig. Falls Sie nicht der beabsichtigte Empfänger sind, ist jegliche Veröffentlichung, Verteilung oder sonstige in diesem Zusammenhang stehende Handlung untersagt und unter Umständen rechtswidrig. Herkömmliche E-Mails sind zudem nicht gegen Zugriff geschützt und können mit und ohne Einfluss von Dritten verloren gehen, verändert oder verfälscht werden. Eine Haftung für die Unversehrtheit von E-Mails oder hieraus entstandene Schäden kann daher nicht übernommen werden. The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee and access to the e-mail by anyone else is prohibited. If you are not the intended recipient, any disclosure, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Common e-mails are not protected against access by third persons and therefore might be lost, changed or falsified, with or without any interference by third persons. We cannot accept any responsibility for the integrity of e-mails or for any damages resulting out of these circumstances. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users