Connecting Tech Pros Worldwide Help | Site Map

I have 100 servers which need a new backup server added to a text file,

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 1st, 2006, 10:25 AM
gavino
Guest
 
Posts: n/a
Default I have 100 servers which need a new backup server added to a text file,

This seems easy but I have been asking tcl and python IRC chat all day
and no one gave an answer.
I have 100 servers which need a new backup server added to a text file,

and then the backup agent restarted.
If I have a list of the servers, all with same root password, and the
connection is ssh.
How do I connect to the server, cat the line to the config file, stop
adn start the agent, and then do same to next server in list and
iterate through the 100 servers.
What script would allow this?


  #2  
Old July 1st, 2006, 11:35 AM
David Haynes
Guest
 
Posts: n/a
Default Re: I have 100 servers which need a new backup server added to atext file,

gavino wrote:[color=blue]
> This seems easy but I have been asking tcl and python IRC chat all day
> and no one gave an answer.
> I have 100 servers which need a new backup server added to a text file,
>
> and then the backup agent restarted.
> If I have a list of the servers, all with same root password, and the
> connection is ssh.
> How do I connect to the server, cat the line to the config file, stop
> adn start the agent, and then do same to next server in list and
> iterate through the 100 servers.
> What script would allow this?
>[/color]
Curl will let you do this.

-david-

  #3  
Old July 1st, 2006, 06:45 PM
gavino
Guest
 
Posts: n/a
Default Re: I have 100 servers which need a new backup server added to a text file,

list of servers L.txt
#cat L.txt
config file is /var/bkupexec/agent.cfg need to add "tell epobackup" to
bottom of file
# cat "tell epobackup" >> /var/bkupexec/agent.cfg
agent is /etc/init.d/agent.ini stop (and then start)
# /etc/init.d/agent.init stop
# /etc/init.d/agent.init start
os=redhat ent 4ES
I intend to use root password which is same for all 100 servers.
#now I'm stuck

David Haynes wrote:[color=blue]
> gavino wrote:[color=green]
> > This seems easy but I have been asking tcl and python IRC chat all day
> > and no one gave an answer.
> > I have 100 servers which need a new backup server added to a text file,
> >
> > and then the backup agent restarted.
> > If I have a list of the servers, all with same root password, and the
> > connection is ssh.
> > How do I connect to the server, cat the line to the config file, stop
> > adn start the agent, and then do same to next server in list and
> > iterate through the 100 servers.
> > What script would allow this?
> >[/color]
> Curl will let you do this.
>
> -david-[/color]

  #4  
Old July 2nd, 2006, 08:45 AM
Tim Martin
Guest
 
Posts: n/a
Default Re: I have 100 servers which need a new backup server added to atext file,

gavino wrote:
Quote:
This seems easy but I have been asking tcl and python IRC chat all day
and no one gave an answer.
I have 100 servers which need a new backup server added to a text file,
>
and then the backup agent restarted.
If I have a list of the servers, all with same root password, and the
connection is ssh.
How do I connect to the server, cat the line to the config file, stop
adn start the agent, and then do same to next server in list and
iterate through the 100 servers.
What script would allow this?
>
If I understand you correctly, I believe Mussh might do the trick:

http://sourceforge.net/projects/mussh

I've never used it myself though.

Tim
  #5  
Old July 3rd, 2006, 10:05 PM
Colin McKinnon
Guest
 
Posts: n/a
Default Re: I have 100 servers which need a new backup server added to a text file,

gavino wrote:
Quote:
This seems easy but I have been asking tcl and python IRC chat all day
and no one gave an answer.
I have 100 servers which need a new backup server added to a text file,
>
and then the backup agent restarted.
If I have a list of the servers, all with same root password, and the
connection is ssh.
How do I connect to the server, cat the line to the config file, stop
adn start the agent, and then do same to next server in list and
iterate through the 100 servers.
What script would allow this?
Kind of OT.

I used rsync for maintaining config files on my servers with shared keys -
but its not a good idea to do this as the root user.

I can just tell that this is one of things where 'only doing it once' it
just wishful thinking. Try asking on one of the admin (e.g.
comp.os.unix)lists as they might have better suggestions than I.

Since you're using root to ssh into these boxes (it's generally considered
BAD practice to allow root to ssh in directly) you'll need to use expect or
PHP's popen to feed the password to the ssh session. That'll get it done
this time - but really you should be setting up some cluster management
system where the nodes poll config from a central location and deal with it
sensibly.

C.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.