What is Rsync over SSH? Command for Rsync over SSH?

The Rsync – Remote Sync is a powerful command-line tool in Linux. Normally rsync is used to transfer file from one server(source) to another server(destination). We already discussed the basics of Rsync command and its switches. Please read this for more info >> Rsync command in Linux and its switches << Rsync will actually look and see what in the file has changed and upload only the part of the file that has changed. Unlike ftp and other transfer solutions rsync doesn’t simply re-upload the entire file.

Here I’m explaining the command to Rsync over SSH.

Syntax

# rsync -avz -e ssh Source Destination 

If the destination server has a different SSH port, you need to know this command to connect and Rsync files from that server.

Rsync command with destination port

# rsync -avz -e 'ssh -p port' Source Destination 

Example

# rsync -avz -e 'ssh -p 2222' Source Destination 

-v : verbose
-a : archive
-z : to enable compression

Advantages of Rsync

1, Secure
2, Faster
3, Sutable for recurring tasks

Related

1, 20+ Rsync command switches
2, Tar command with example
3, LSOF command details

Arunlal Ashok

Sr. Linux Server Administrator. I'm managing Linux servers since 2012. I started this blog to share and discuss my ideas. Check My Profile in uPwork (oDesk) and create a job, if you need any administration help. Thanks!!

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *