how do I copy from server to server

Rodolfo J. Paiz rpaiz at simpaticus.com
Fri Jan 7 16:56:51 UTC 2005


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:

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

Transfers the entire tree, keep permissions and dates and everything,
uses SSH transport for security, and is simple as hell. Can also be used
locally, and can even enable compression if so desired.

Cheers,

-- 
Rodolfo J. Paiz <rpaiz at simpaticus.com>




More information about the fedora-list mailing list