Site icon Shaharia's Blog

Rsync – Useful techniques & usage

I already wrote about rsync 5 years ago in another blog post. But today I am going to write a separate article that will help you to become a master in using rsync. Rsync is one of the most useful tools for system administrator and others who are responsible to maintain DevOps tasks. So it’s worth bookmarking this article for you as a rsync reference.

I am not going to write lots of stuff about what it is and why it’s useful. Straight I am going to discuss about it’s usage. First, we need to know some basic command structure for rsync.

Command format

You need to understand the basics to formate a command for rsync.

rsync options source destination

Common options for rsync

Here are some common options for rsync those are most popular and requires for most of the use case.

Transfer file from local to remote (via SSH)

It’s one of the most common use-case for all. We need to transfer files from here to there and from there to here. Personally I need to do few times daily basis. But it saves my day.

Here is the simple commands to transfer your local file to any remote system via SSH with rsync.

rsync -avz local_directory/ ssh_username@ip_address_of_remote_server:/home/

Exit mobile version