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

Your name:

Reply:


Posted by Colin McKinnon on 07/03/06 22:05

gavino wrote:

> 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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация