- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- SCRIPT TO COPY DATA TO REMOTE SYSTEM
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
03-10-2011 05:27 AM
03-10-2011 05:27 AM
SCRIPT TO COPY DATA TO REMOTE SYSTEM
I want to copy some data (file and directory) from one server to remoter server through script.
Anybody help me to find out the scripts.
File:
===
/etc/XXX
/etc/YYY
Any model script for this please give me.
Thanks in Advance
VINAY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2011 05:57 AM
03-10-2011 05:57 AM
Re: SCRIPT TO COPY DATA TO REMOTE SYSTEM
you can use scp command with -r option to copy directories.
scp -r /etc/xxx ip:/etc/yyy
another way is using tar with ssh.
tar cvf - /etc/xxx | ssh ip "( cd /etc/yyy ; tar xvf - )"
or rsync with ssh, after creating public keys and distributing between servers
/usr/local/bin/rsync -avz -e ssh /etc/xxx/* user@target_ip:/etc/yyy/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2011 05:58 AM
03-10-2011 05:58 AM
Re: SCRIPT TO COPY DATA TO REMOTE SYSTEM
scp /etc/XXX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2011 06:02 AM
03-10-2011 06:02 AM
Re: SCRIPT TO COPY DATA TO REMOTE SYSTEM
I don't know what do you mean by "script", but if there are no special conditions, following can be used:
machineA# cd /etc/YYY
machineA# ssh machineB -n "cd /etc/XXX; tar cpf - ." | tar xvf -
cheers
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2011 06:13 AM
03-10-2011 06:13 AM
Re: SCRIPT TO COPY DATA TO REMOTE SYSTEM
You'd simply set no password on the private key, and insure that the permissions on the private key file are such that only the account associated with the script can read it. You can also restrict the key to support only this connection and command using options in the authorized_keys file.