On 1/22/09, Munir Nassar <tclug at beitsahour.net> wrote:
> On Thu, Jan 22, 2009 at 08:22, Raymond Norton <admin at lctn.org> wrote:
>>> tar cf - . | ssh <remoteuser>@<remotehost> "cd <destination>; tar xf -"
>>
>> This is working fine. I added -v so I could watch the progress.
>>
>> Does rsync copy faster?
>
> no, rsync has to compare each file on both ends which saps time.
>
> tar over nc is probably faster still than tar / ssh, dispensing with
> compression and encryption and using UDP instead can get you another
> 10%* perhaps.
>
> *one of these days i need to run some tests to get a more scientific answer.

A little clarification is in order here...

While rsync does a comparison, it only copies files that have changed.
 Tar/rcp/scp/find-cpio/etc will typically copy the entire contents
depending upon the parameters specified.

If rsync is possible, I would highly recommend using that instead.  It
will preserve file permissions, ownership, date/time, etc.  scp/sftp
will not unless you tar the directory's contents up and move the
tarball over.

While it's true that rsync does chew up time doing the comparison,
it's been my experience that rsync (even with the comparison) is most
times faster than other methods**.  Given the fact that it keeps
permissions so that I don't have to reset anything, even faster.
Also, if this is going to be an ongoing transfer of files within the
directory, much faster in that it only does the files/directories
which have changed.

** Said comparison has not been scientifically proven

-- 
-Shawn