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

Post navigation

Arunlal A

Senior System Developer at Zeta. Linux lover. Traveller. Let's connect! Whether you're a seasoned DevOps pro or just starting your journey, I'm always eager to engage with like-minded individuals. Follow my blog for regular updates, connect on social media, and let's embark on this DevOps adventure together! Happy coding and deploying!

3 thoughts on “What is Rsync over SSH? Command for Rsync over SSH?

  1. Your blog is very nice, thanks for sharing. It’s just very nice, thanks for sharing with us. Enjoyed every bit of your blog.Really looking forward to reading more.

Leave a Reply

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