how do I copy from server to server

Ow Mun Heng Ow.Mun.Heng at wdc.com
Sun Jan 9 05:06:49 UTC 2005


On Sat, 2005-01-08 at 00:56, Rodolfo J. Paiz wrote:
> On Fri, 2005-01-07 at 11:01 -0500, Matthew Crocker wrote:
> > If you need to copy a bunch of stuff *and* keep your permissions you 
> > can do something like
> > 
> > 
> > tar czf - /files/I/want/to/back/up/* | ssh -l root -c "(cd 
> > /new/location/for/files && tar -xf - )"
> > 
> > Basically you are creating a tar file and outputting it to STDOUT which 
> > is piped to STDIN of an ssh session which sends it to STDIN of a tar 
> > process running on the other machine.
> > 
> 
> Good Lord.
> 
> Much simpler way, Matt:

Simpler yes. Efficient No.

> 
> rsync -avSPe ssh /path/to/files/* user at host:/path/to/directory/

usage of Rsync is only good when you already have partial trees. When
you want to transfer things from scratch, usage of tar is _very_ much
faster.

Time it and you'll see what I mean.


-- 
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 
98% Microsoft(tm) Free!! 
Neuromancer 00:02:29 up 3:08, 2 users, 
load average: 0.19, 0.49, 0.68 




More information about the fedora-list mailing list