Bacula-users

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

2012-09-06 08:39:23
Subject: Re: [Bacula-users] Running complex commands or scripts remotely on a client
From: "Gary R. Schmidt" <grs AT mcleod-schmidt.id DOT au>
To: bacula-users AT lists.sourceforge DOT net
Date: Thu, 06 Sep 2012 22:36:00 +1000
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 all the clients. With
> multiple lines, maybe you can change just one line in the Job
> Definition.
>
> Don't know how many you have in your backup infrastructure, but that's
> not feasible at all in our setup; especially because the clients and
> daemons are separated by firewalls and do not allow easy copying
> everywhere.
As a suitably secure user:

     $ for i in `cat list_of_backup_machines`
     do
         scp magicscript $i:/opt/bacula/magicscript
     done

If you haven't set up ssh-equivalence, and, for some reason cannot do 
so, then an 'expect' script is only slightly more complicated.

Probably be a good idea, in that case, to write an expect script to set 
up ssh equivalence.

     Cheers,
         Gary    B-)

-- 
When men talk to their friends, they insult each other.
They don't  really mean it.
When women talk to their friends, they compliment each other.
They don't mean it either.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users