- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- rcp or rsync in an efficient way (Script problem)
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
Discussions
Discussions
Discussions
Forums
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
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
тАО08-22-2002 09:12 PM
тАО08-22-2002 09:12 PM
I would like to perform a remote copying over the WAN by using rcp or rsync. There's 100 filesystems which needs to be copied over the WAN. Once copied, these filesystems would need to be kept in sync(changes occuring on a source machines should be reflected and the destination machine.
This is how I've done it:
#!/bin/sh
for i in `cat file1`
do
rcp -p -r mickey.willowglen.com:$i /destination_filesys
done
OR
#cat myscript.sh
#!/bin/sh
for i in `cat file1`
do
rsync -avz --delete mickey.willowglen.com:$i /destination_filesys
done
I then invoked these script in multiples by running them at the background
#myscript > tmpFile &
But that did not improve the situation.
Is there a more efficient/better way of performing such remote copying/ or sync-up, with so many filesystems involved??
Could someone please help me out?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2002 02:09 AM
тАО08-23-2002 02:09 AM
Re: rcp or rsync in an efficient way (Script problem)
Famous words: If you are in a hurry, you should take it easy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2002 02:13 AM
тАО08-23-2002 02:13 AM
Re: rcp or rsync in an efficient way (Script problem)
Better use FTP for initial file transfer and rsync for updating the files.
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2002 02:25 AM
тАО08-23-2002 02:25 AM
Re: rcp or rsync in an efficient way (Script problem)
I'm expecting 800GB of filesystems to be transferred using the WAN, and later perform the incremental updates using rsync.
I ran the script in parallel by feeding the script with different input files i.e
#cat inpufile_1
/fs10/my_circuits/
/circuits_project/simulations/
#cat inputfile_2
/fs11/xxx/
/fs13/yyy/
#myscript inputfile_1 > tmpFile_1 &
#myscript inputfile_2 > tmpFile_2 &
Are there any other ways which I can exploit the info on the threads/number of rsync/rcp/ftp processes running, then invoke more of such process if the number of running process has not exceeded the threshold?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2002 02:34 AM
тАО08-23-2002 02:34 AM
Re: rcp or rsync in an efficient way (Script problem)
I recommend not to start multiple sessions for multiple files as this will cause heavy congestion in your WAN and will slow down ( will cause more delay for the packets )the
realtime traffic services like telnet , rlogin
etc. Telnet will hang for example.
Only way is to do sequentially even if it takes
a night. 100files/1 night
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2002 03:20 AM
тАО08-23-2002 03:20 AM
Re: rcp or rsync in an efficient way (Script problem)
I did the following, where file1 contains the list of 100 filesystems:
for i in `cat file1`
do
numProcess=`ps -ef|grep rsync|wc -l
if [numProcess < 10 ]
then
rsync -avz mickey.willowglen.com:$i /destination_filesystems
else
sleep 300
fi
done
The script would copy or incrementally update all 100 filesystems, but with 10 filesystems at a time.
Could anyone help me out on making improvements to such scripts, at the same time achieving efficient throughput time over the WAN?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2002 04:31 AM
тАО08-23-2002 04:31 AM
Re: rcp or rsync in an efficient way (Script problem)
What is the speed of the WAN? Please clearly specify bits versys bytes, etc..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-24-2002 07:54 PM
тАО08-24-2002 07:54 PM
Re: rcp or rsync in an efficient way (Script problem)
The speed of the WAN is 0.5GB(GigaBytes)/hr. Hence, if there's 50GB of filesystems to be copied over the WAN, it would take 100 hours i.e approx 5 days to copy stuffs over.
Any ideas?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2002 06:09 PM
тАО08-25-2002 06:09 PM
Solution- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2002 06:10 PM
тАО08-25-2002 06:10 PM
Re: rcp or rsync in an efficient way (Script problem)
My suggestion for you would be using rsync cos' it is very efficient for file transfer. I've tested rsync against ftp and found that rsync is significantly more efficient than ftp. In addition, the other advantages of rsync I could think of are,
1. It will not send un-modified files. Meaning that if only 2G out of the 800GB data were updated, then rsync will send out these 2G updated files only.
2. Rsync can perform compression before sending out files. This is good for slower networks.
Just try transferring a 10GB using rcp, ftp and rsync then you'll see the difference in raw transferring speed !!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2002 06:21 PM
тАО08-25-2002 06:21 PM
Re: rcp or rsync in an efficient way (Script problem)
The speed of the WAN is 0.5GB(GigaBytes)/hr. Hence, if there's 50GB of filesystems to be copied over the WAN, it would take 100 hours i.e approx 5 days to copy stuffs over.
But earlier you stated you expected 800GB.
That's 16 TIMES greater than 50GB. Using that figure it would, based upon your calculations, 80 days to make the initial transfer. Now, if this is true, the data change that could occur, might cause the transfer of data change to be exponentially larger than the initial transfer.
Imagine this: You are transfering a file while it is being modified. How will this change me checked, and the data transfered?
I'd suggest you consider, although expensive, purchasing EMC and use srdf to accomplish this.
Unless you are into writing software that would revolutionize the world, I think you need a "hardware" solution.
live free or die
harry