[Bacula-users] Running complex commands or scripts remotely on a client

2012-09-05 Thread Alex Lucas
Dears, Is there a way to run a complex command or even a script on a client? So far I have tried two ways and failed: 1) when a command (e.g. in "ClientRunBeforeJob") has something like "echo test > /tmp/test.out" bacula runs it on the client as "echo" as command and the rest as the argument. i.e

Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-05 Thread Christian Manal
On 05.09.2012 12:43, Alex Lucas wrote: > Dears, > > Is there a way to run a complex command or even a script on a client? > > So far I have tried two ways and failed: > 1) when a command (e.g. in "ClientRunBeforeJob") has something like > "echo test > /tmp/test.out" bacula runs it on the client a

Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-05 Thread Jérôme Blion
Le 05/09/2012 12:43, Alex Lucas a écrit : > Dears, > > Is there a way to run a complex command or even a script on a client? > > So far I have tried two ways and failed: > 1) when a command (e.g. in "ClientRunBeforeJob") has something like > "echo test > /tmp/test.out" bacula runs it on the client

Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-05 Thread dweimer
On 2012-09-05 05:43, Alex Lucas wrote: > Dears, > > Is there a way to run a complex command or even a script on a client? > > So far I have tried two ways and failed: > 1) when a command (e.g. in "ClientRunBeforeJob") has something like > "echo test > /tmp/test.out" bacula runs it on the client as

Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-05 Thread Alex Lucas
On 05/09/12 19:24, Christian Manal wrote: > On 05.09.2012 12:43, Alex Lucas wrote: >> Dears, >> >> Is there a way to run a complex command or even a script on a client? >> >> So far I have tried two ways and failed: >> 1) when a command (e.g. in "ClientRunBeforeJob") has something like >> "echo tes

Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-05 Thread ganiuszka
W dniu 06.09.2012 03:23, Alex Lucas pisze: > On 05/09/12 19:24, Christian Manal wrote: >> On 05.09.2012 12:43, Alex Lucas wrote: >>> Dears, >>> >>> Is there a way to run a complex command or even a script on a client? >>> >>> So far I have tried two ways and failed: >>> 1) when a command (e.g. in "

Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-05 Thread Alex Lucas
On 06/09/12 12:10, ganiuszka wrote: > W dniu 06.09.2012 03:23, Alex Lucas pisze: >> On 05/09/12 19:24, Christian Manal wrote: >>> On 05.09.2012 12:43, Alex Lucas wrote: Dears, Is there a way to run a complex command or even a script on a client? So far I have tried two ways

Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-05 Thread Uwe Schuerkamp
On Thu, Sep 06, 2012 at 06:10:16AM +0200, ganiuszka wrote: > > It works for me. Did you try to use semicolon character for separate > elementary commands? > > Example: > > ClientRunBeforeJob = "/bin/bash -c 'echo aaa >/tmp/foo1.out; echo bbb > > /tmp/foo2.out'" > > Regards. > gani For improv

Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-05 Thread Christian Manal
On 06.09.2012 08:17, Alex Lucas wrote: > On 06/09/12 12:10, ganiuszka wrote: >> W dniu 06.09.2012 03:23, Alex Lucas pisze: >>> On 05/09/12 19:24, Christian Manal wrote: On 05.09.2012 12:43, Alex Lucas wrote: > Dears, > > Is there a way to run a complex command or even a script on a

Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-06 Thread Gary R. Schmidt
On 6/09/2012 4:17 PM, Alex Lucas wrote: [SNIP] > It works with ";" like you mentioned above but I was asking about > splitting the command across multiple lines in the configuration file -- > when there are many commands it would make it easier to read. If there are "many commands" then you would

Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-06 Thread Fahrer, Julian
Am 06.09.2012 um 09:12 schrieb "Gary R. Schmidt" : > On 6/09/2012 4:17 PM, Alex Lucas wrote: > > [SNIP] > >> It works with ";" like you mentioned above but I was asking about >> splitting the command across multiple lines in the configuration file -- >> when there are many commands it would make

Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-06 Thread Simone Caronni
> You could also use multiple ClientRunBefore statements in the config file. > Personally I would still prefer a script in the client. On my setups I use the opposite. If you need to add a line to the script, you need to copy the same script over all the clients. With multiple lines, maybe you ca

Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-06 Thread Alex Lucas
On 06/09/12 16:39, Simone Caronni wrote: >> You could also use multiple ClientRunBefore statements in the config file. >> Personally I would still prefer a script in the client. > On my setups I use the opposite. If you need to add a line to the > script, you need to copy the same script over all

Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-06 Thread Gary R. Schmidt
On 6/09/2012 6:39 PM, Simone Caronni wrote: >> You could also use multiple ClientRunBefore statements in the config file. >> Personally I would still prefer a script in the client. > On my setups I use the opposite. If you need to add a line to the > script, you need to copy the same script over a

Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-06 Thread Simone Caronni
On 6 September 2012 14:36, Gary R. Schmidt wrote: > As a suitably secure user: > > $ for i in `cat list_of_backup_machines` > do > scp magicscript $i:/opt/bacula/magicscript > done Yep, I know I can scp cycle on a list of machines, but doesn't fit anyway. We don't have SSH