Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have more than 100 systems running ubuntu. I have a configuration file in one of these systems say 172...10. Can i get that configuration file from the other sytem say 172...100 using wget? I have installed wget? And i have tried the following wget http://172.*.*.10/name.conf but i am not able to get that file.Can some one help?

share|improve this question
add comment

6 Answers

up vote 1 down vote accepted

You will need to do two things:

  1. Install Apache on your Ubuntu installations. The command to use is sudo apt-get install apache2.
  2. Copy or move your file.conf to the folder at /var/www. You might need to use sudo for this again: for example, sudo cp /path/to/your/file.conf /var/www/file.conf.

wget will probably not work with wildcards. A better solution will be to do something like this as a shell script, once all your configuration files are accessible:

#!/bin/bash

for i in {1..100}

do

wget "127.0.$i.1"

done

Good luck!

share|improve this answer
3  
I think installing apache on all of the workstations might be overkill / a security risk. –  Stefano Palazzo Apr 10 '11 at 15:37
add comment

scp or rsync are probably better suited to grabbing a single arbitrary file from multiple machines.

If however, that single file is passwords, remote mount configurations, or similar system administration functions you should use the Network Information System (NIS) which is specifically designed for centralized management to make all 100 machines look like they are the same machine to someone sitting in front of one.

share|improve this answer
add comment

The solutions here will help you, but "ssh in a for loop" for that many computers will end up costing you time in the long run. You should consider a configuration management tool like puppet:

This way you define what you want the PCs to look like and they get configured automatically. For getting information on all your nodes check out mcollective.

share|improve this answer
add comment

wget will only be able to download anything if there is an HTTP server running at the other end.

As you may be able to run commands via ssh in bulk, this might help:

# on the client machine:
cd /home/username/Pictures/
python -m SimpleHTTPServer

This starts a web-server on the machine it's run on. You can then access the file from anywhere using

wget http://172.29.34.15:8000/vacation.jpeg
share|improve this answer
add comment

For this sort of purposes, you might want to look at version-control systems, from which you can "branch out" or "check out" your files. It might get kind of confusing though. For tools, perhaps look at config-manager or somesuch. I used to do it with CVS+Make back in the day, it was kind of perverse i admin! :D

share|improve this answer
add comment

I recommend using Ubuntu One for synchronizing these files.

There's also a guide: https://help.ubuntu.com/10.10/internet/C/networking-shares.html

But it's not possible to download this file with wget, because wget uses the http protocol to download files. If you don't have apache running on your servers, it's not possible. But, do NOT install apache just to synchronize some files!

I hope this helped you, Daniel

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.