Re: how do I copy from server to server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@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@xxxxxxxxxxxxxx>


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux