Posted in Howto Linux SSH Security
Securely synchronize a folder from a remote machine with SSH
February 13, 2007 - 2 comments
rsync -vaz -e ssh user@server.domain.be:/home/user/ /home/user/
Source : user@server.domain.be:/home/user/
Target : /home/user/
-a : archive mode, preserve owner/group and permissions
-v : verbose
-z : compress data during transfer
-e : the remote shell to use
Output :
receiving file list ... done
created directory /home/user
./
28403/
BEXX0014/
28403.xml
error.xml
.
sent 876 bytes received 1294165 bytes 2590082.00 bytes/sec
total size is 1644823 speedup is 1.27
Comments
The Adminblogger
February 14, 2007 - 1:01
Sorry for the -z dupe – didn’t see you mentioned it already
Leave Comment
Please consider visiting the partners below if you enjoyed this article :If this post saved you time and money, please consider checking my Amazon wishlist.







The Adminblogger
Hi Sebastien,
i’ve been told recently that the ‘-e ssh’ switch isn’t necessary anymore since it’s the default for rsync from/to remote hosts.
if you have data to transfer which could be easily compressed (such as logfiles) you might want to add -z (for gzip compression).
Ciao,
Marcel.