Operating System - HP-UX
1833873 Members
3466 Online
110063 Solutions
New Discussion

which one is more faster ftp or rcp

 
Mangal Pandey
Occasional Contributor

which one is more faster ftp or rcp

i have files to be transfer from one box to another box as soon as it arrives to first box.
can anybody tell me which one will be faster ftp or rcp, so that i will configure my transfer script to use according tool.
3 REPLIES 3
Jannik
Honored Contributor

Re: which one is more faster ftp or rcp

In this like Steven answers you question:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1059469

This is very good reading:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1061468

In any case i would test different sollutions and time them, to make i had the best sollution for my installation.

How to copy a directory across the network?

# cd source_directory
# find . | cpio -oc -depth -mountstop | remsh target_host "cd target_dir; cpio -icdmux"

Remark: A remote-backup can only be done, when a login without password check is configured on the remote-host, i.e.you have to touch the file .rhosts on the remote-host containing the accessing host.

Other nice ones to know:
tar cf - . | ssh user@host "(cd ; tar xf - )"

find . -depth | cpio -dumpv /

server2# cd /home
server2# ssh root@server1 "cd /home;tar -cf - ./ | /usr/contrib/bin/gzip -c " | gunzip -c | tar -xf -

I think that the last one is the fastes because you conpress before you move.

You are prob. going for this one witch is very fast:

On ServerA
# cd /home/userhome/dirA
# (find . -xdev|cpio -coax)|remsh serverB "cd /home/userhome/newdir;cpio -icdmuxla"
jaton
Steven Schweda
Honored Contributor

Re: which one is more faster ftp or rcp

> [...] i would test different sollutions
> and time them [...]

Exactly. Why ask people for opinions, when
the hardware will certainly give you the
right answer?

> I think that the last one is the fastes [...]

Maybe. If the CPUs compressing and expanding
are faster than the network is transmitting.
Knowing nothing about either, I would simply
run the experiment.
A. Clay Stephenson
Acclaimed Contributor

Re: which one is more faster ftp or rcp

From a pure performance perspective, ftp is the faster protocol because it has marginally less overhead but the differences are very small. One of the real questions you should be asking is "did all of the file arrive?" and "are the data intact?". Testing FTP transfers is more difficult than testing rcp transfers and if you are transferring large files over a slow or less than reliable network, you might find that it makes more sense to split the file and cat then together upon arrival so that only a portion of a large file might need to be re-transmitted.
If it ain't broke, I can fix that.