- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Single file from multiple locations..
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2006 06:58 PM
11-07-2006 06:58 PM
Single file from multiple locations..
I need to drag backup files from over 100 different server locations to a single server. The file size and bandwidth is not an issue, i seem to be struggling with automating the process. I need to be able to pull the files (single file on each HP server, each file has the same name...) to a single location on my local server. Each file would need to be either renamed or suffixed with the ip of the originating server to identify it or saved to a separate folder on my server. I can run a batch file that will do a single server but i don’t fancy the idea of running 100 batch files,
How could i run one script that will automate the entire process?
Tall order i think but any help would be appreciated.
Regards
Mac
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2006 07:07 PM
11-07-2006 07:07 PM
Re: Single file from multiple locations..
I would suggest rsync with the following syntax.
rsync -avH --stats -e ssh source:/home/ /backup/
Organize it any way you want, you can pull in files from many places at the same time.
If bandwidth is truly not an issue.
:-)
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2006 07:08 PM
11-07-2006 07:08 PM
Re: Single file from multiple locations..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2006 07:21 PM
11-07-2006 07:21 PM
Re: Single file from multiple locations..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2006 07:32 PM
11-07-2006 07:32 PM
Re: Single file from multiple locations..
rsync/scp/ftp/rcp
I would prefer scp/rsync
Prepare host file. Say hosts
for host in $(
scp/rsync ${host}:/source_path/file dest_host:/dest_path/file.${host)
# This will put file as file.hostname on destination.
done
you can some error checking as required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2006 07:44 PM
11-07-2006 07:44 PM
Re: Single file from multiple locations..
quickly written script, so may have a few hiccups:
#!/usr/bin/sh
remote_file="fred.lis"
location="/data/directory"
while read address user pass
do
echo "#!/usr/bin/sh" > ftpscript.sh
echo "ftp -n $address < EOF" >> ftpscript.sh
echo "user $user $pass" >> ftpscript.sh
echo "cd $location" >> ftpscript.sh
echo "get $remote_file ${address}_${remote_file} >> ftpscript.sh
echo "quit" >> ftpscript.sh
echo "EOF" >> ftpscript.sh
chmod 777 ftpscript.sh
./ftpscript.sh > ftpscript.log 2>&1
done < ip_address.lis
You just need a file (ip_address.lis) with:
ip_address username password
Please change the location and remote_file names at beginning of script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2006 12:56 AM
11-08-2006 12:56 AM
Re: Single file from multiple locations..
get /bin/prd/full_format.dft "%localhost%c:\test\full_format,dft
I would hope this would give me a filename of 22.22.22.222full_format_dft
I am guessing I am way of the mark with this...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2006 01:32 AM
11-08-2006 01:32 AM
Re: Single file from multiple locations..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2006 01:53 AM
11-08-2006 01:53 AM
Re: Single file from multiple locations..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2006 02:08 AM
11-08-2006 02:08 AM
Re: Single file from multiple locations..
If so, the yes, ftp can rename the file on the fly for you, the syntax would be:
get source_file_name dest_file_name
now, as the the mechanics of getting VBScript to do this, (and the variable substitution) you might have better luck in a "Window" forum.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2006 02:10 AM
11-08-2006 02:10 AM
Re: Single file from multiple locations..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2006 02:42 AM
11-08-2006 02:42 AM
Re: Single file from multiple locations..
so, asking:
how do I determine the IP address? or
how do I get it in the "dest_name"
as noted in one of the previous posts, I'd have a file w/ all of the IPs I need to connect to and loop thru it with something that does the equivalent of this in VB
cat iplist | while read ip_addr
do
ftp $ip_addr<
EOF
done
But, as I said above, I don't know the mechanics of doing this in VB......