我有100台服务器,需要将新的备份服务器添加到文本文件中,然后重新启动备份代理。 [英] I have 100 servers which need a new backup server added to a text file, and then the backup agent restarted.

查看:60
本文介绍了我有100台服务器,需要将新的备份服务器添加到文本文件中,然后重新启动备份代理。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这看起来很简单,但我一直都在问tcl和python IRC聊天

而且没有人给出答案。

我有100台需要新备份的服务器服务器添加到文本文件,

然后重新启动备份代理。

如果我有一个服务器列表,所有服务器都具有相同的root密码,并且

连接是ssh。

如何连接到服务器,将线路连接到配置文件,停止

并启动代理,然后执行与列表中的下一个服务器相同并且

遍历100个服务器。

什么脚本允许这个?

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?

推荐答案



gavino写道:

gavino wrote:
这看起来很容易,但我一直在问tcl和python IRC聊天一整天
而且没有一个人给出了答案。
我有100台服务器,需要在文本文件中添加一个新的备份服务器,然后重新启动备份代理。
如果我有一个服务器列表,所有同样的roo t密码,
连接是ssh。
如何连接到服务器,将线路连接到配置文件,停止
启动代理,然后对下一个服务器执行相同操作列表和
遍历100个服务器。
什么脚本允许这个?
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?




从pexpect尝试pxssh。查看页面中的示例。
http://pexpect.sourceforge。 net / pxssh.html

它允许你自动化ssh交互。



Try pxssh from pexpect. Look at the sample in the page.
http://pexpect.sourceforge.net/pxssh.html
It will allow you to automate ssh interactions.


这是否需要ssh客户端或服务器?


我使用authpf打开我的PF防火墙供互联网使用。一般来说我只是打开腻子并打开连接到FW(打开端口)和

缩小它直到我完成。当我关闭putty authpf损失ssh会话

heartbeat然后将指示FW关闭端口。我很乐意

写一个简单的客户来代替我使用putty。你认为这些mod对我来说在windows平台上有用吗?


Thx


" Ravi的Teja" <我们********* @ gmail.com>在消息中写道

news:11 ********************** @ v61g2000cwv.googlegr oups.com ...
Does this require a ssh client or server?

I use authpf to open up my PF firewall for internet use. Generally I just
open up putty and make a connection to the FW ( which open the ports) and
minize it till I am done. When I close putty authpf losses the ssh session
heartbeat and will then instruct the FW to close the ports. I would love to
write a simple client to do this form me instead of using putty. Do you
think these mods would work for me on a windows platform?

Thx

"Ravi Teja" <we*********@gmail.com> wrote in message
news:11**********************@v61g2000cwv.googlegr oups.com...

gavino写道:

gavino wrote:
这看起来很容易,但我一直在问tcl和python IRC聊天整天
没有人给出答案。
我有100台服务器需要新的备份服务器添加到文本文件中,然后重新启动备份代理。
如果我有一个服务器列表,所有服务器都有相同的root密码,并且
连接是ssh。
如何连接到服务器,将线路连接到配置文件,停止
启动代理,然后对列表中的下一个服务器执行相同的操作并重复通过100个服务器。
什么脚本允许这个?
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?



从pexpect尝试pxssh。查看页面中的示例。
http://pexpect.sourceforge。 net / pxssh.html
它将允许您自动化ssh交互。



Try pxssh from pexpect. Look at the sample in the page.
http://pexpect.sourceforge.net/pxssh.html
It will allow you to automate ssh interactions.



服务器列表L.txt
#cat L.txt

配置文件是/var/bkupexec/agent.cfg需要添加tell epobackup

文件底部

#cat" tell epobackup" >> /var/bkupexec/agent.cfg

代理是/etc/init.d/agent.ini停止(然后开始)

#/ etc / init.d / agent.init stop

#/ etc / init.d / agent.init start

os = redhat ent 4ES

我打算用root所有100台服务器的密码相同。

#now我被卡住


Ravi Teja写道:
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

Ravi Teja wrote:
gavino写道:
这看起来很简单,但我一直都在问tcl和python IRC聊天
没有人给出答案。
我有100台服务器需要添加新的备份服务器到文本文件,
然后重新启动备份代理。
如果我有一个服务器列表,所有服务器都有相同的root密码,并且
连接是ssh。
如何如何连接到服务器,将线路连接到配置文件,停止
启动代理,然后对列表中的下一个服务器执行相同的操作,并遍历100个服务器。
什么脚本会允许吗?
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?



试试px来自pexpect的ssh。查看页面中的示例。
http://pexpect.sourceforge。 net / pxssh.html
它将允许您自动化ssh交互。



Try pxssh from pexpect. Look at the sample in the page.
http://pexpect.sourceforge.net/pxssh.html
It will allow you to automate ssh interactions.






这篇关于我有100台服务器,需要将新的备份服务器添加到文本文件中,然后重新启动备份代理。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆