473,769 Members | 3,857 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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?

Jul 1 '06 #1
4 1472
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?

Curl will let you do this.

-david-

Jul 1 '06 #2
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:
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?

Curl will let you do this.

-david-


Jul 1 '06 #3
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?
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
Jul 2 '06 #4
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)li sts 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.
Jul 3 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2834
by: Paul Winkler | last post by:
This is driving me up the wall... any help would be MUCH appreciated. I have a module that I've whittled down into a 65-line script in an attempt to isolate the cause of the problem. (Real domain names have been removed in everything below.) SYNOPSIS: I have 2 target servers, at https://A.com and https://B.com. I have 2 clients, wget and my python script.
1
4168
by: Ben M. | last post by:
Greetings all, This should be an easy task, and Im sure it is, but as many times as I have tried, I cant seem to get this to work properly. We changed ISPs recently from a shared host to a co-located server, and our former host was nice enough to send us a backup of our old SQL2000 database (about 5MB). I went into Enterprise Manager, created an empty database with the same name
1
4040
by: Dave Crypto | last post by:
Hi there, SUMMARY: 1) When I use phpadmin to export a large database, the file created on my local PC never containes all the tables and information. It seems to max out at about 10mb. 2) Will running mysqldump from command line on a live in-use DB (with one table containing 350,000 rows) pose any risks and have any large effect of current use?
5
3238
by: HSP | last post by:
hi. i need to restore an old database. The db was backed up using a DLT drive, using 2 volumes. The content for the tapes was copied to file onto Solaris machine using rsh and dd (for backup purposes). Now, the drive is defective and can't read the tapes anymore. Server is AIX 4.3.2 and database is IBM DB2 Server (DB2 for AIX Version 2.1.2)
2
1993
by: happyjenny52 | last post by:
Hi, I work as an IT Administrator and part of my job role is to use Enterprise Manager and Query Analyzer to backup the logins and permissions for each database on our SQL Servers. This information is used as a backup in the event of a server failing so we then have something to fall back on if we need to add the same logins/permissions again. This takes ages to do, as I have to manually enter all the information
13
2411
by: gavino | last post by:
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...
1
11139
by: Screenbert | last post by:
After finding nothing anywhere in google I am posting this so everyone can benefit by it. The formating is not pretty since I copied it from my word document, but you should benefit by it. Managing DHCP Servers using C# They said it was impossible. It couldn't be done. But you can in fact manage DHCP servers using C#. This includes creating and deleting Scopes, SuperScopes, Reservations, Exclusions, Options and so forth. Since the dll...
2
1922
by: garther | last post by:
Hi I'm trying to get something like this to work: Application calculates data and stores them in local SQL server. Once a week this data needs to copied to DVD. Then I need second application which has to take this data from DVD and send to global SQL server. Talking directly from remote hosts to main database is not an option.
3
2819
by: sqldba | last post by:
Hi, I have two servers, one is a production server and other is a testing server. Both these servers must be in sync. Please can anyone let me know how to synchronize these two servers(automatically) without replication. In particular i want databases, tables, views, users and stored procedures to be same in both the servers. If a table gets added/deleted/update on the production , the same must be done on testing server. Please help...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10212
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9995
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5304
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3962
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.