- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: copy files
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
06-29-2009 01:14 AM
06-29-2009 01:14 AM
copy files
p.s. I may be use the script / method in other unix-like distro. except HP , can advise a method that applicable to other system ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2009 01:24 AM
06-29-2009 01:24 AM
Re: copy files
You can use rsync and run it until you see that all files are copied succesfully. The utility verifies copy result.
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2009 02:34 AM
06-29-2009 02:34 AM
Re: copy files
rsync's advantages are that it will skip files already copied.
The -e option can be used to run teh data stream through ssh, which encrypts it.
Example code:
rsync -avH --stats --delete -e ssh /var/httpd/ $othernode:/var/httpd/
othernode is the target node. --delete deletes files from the target server that have been deleted on the source server.
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
06-29-2009 04:51 AM
06-29-2009 04:51 AM
Re: copy files
http://h20392.www2.hp.com/portal/swdepot/searchProducts.do
If ssh is not installed on your system, get a copy from:
http://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2009 08:00 PM
06-29-2009 08:00 PM
Re: copy files
What I need to do is simply use rsync to copy file to server B is OK ? or I need to write a script like
rsync from serverA to serverB
if error code = 0 # that mean successful copy to server B
then remove the file
if not equal to 0 ,
then keep the file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2009 08:30 PM
06-29-2009 08:30 PM
Re: copy files
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2009 08:56 PM
06-29-2009 08:56 PM
Re: copy files
To know more about rsync see the below link.
http://www.sunsite.ualberta.ca/Documentation/Misc/rsync-2.6.6/rsync.1.html
or
http://www.samba.org/rsync/documentation.html
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2009 10:32 PM
06-29-2009 10:32 PM
Re: copy files
I tested it , it seems very fine , can advise this method is good for the case when there are many many files need to be copy to server B and also all these files are very small in size ( less than 1 K byte ) ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2009 12:13 AM
06-30-2009 12:13 AM
Re: copy files
I would like to add such request , if the files are successful copy to server B , then make a file copy to local directory /tmp/backup then remove it or simply move it to /tmp/backup , so that I know what files are successfully copied.
I tried the below method , it can copy file to /tmp/ora_file but do not make backup to /tmp/backup or remove the files , can advise how can I change it ? thx
rsync -avH --delete -b --backup-dir=/tmp/backup -e ssh * root@192.168.0.3 :/tmp/ora_file