Administrative tools

What is Rsync over SSH?

Table of Contents

Rsync is a very flexible network-enabled syncing tool. It can also refer to the network protocol developed to utilize this tool.  Rsync stands for Remote Sync. Normally rsync is used to transfer file from one server (source) to another server (destination).

Basic Syntax

1)  Create some test files with the following commands:

cd ~
mkdir dir1
mkdir dir2
touch dir1/file{1..100}

2)  Directory called dir1 with 100 empty files in it.

ls dir1
file1    file18  file27  file36  file45  file54  file63  file72  file81  file90
file10   file19  file28  file37  file46  file55  file64  file73  file82  file91
file100  file2   file29  file38  file47  file56  file65  file74  file83  file92
file11   file20  file3   file39  file48  file57  file66  file75  file84  file93
file12   file21  file30  file4   file49  file58  file67  file76  file85  file94
file13   file22  file31  file40  file5   file59  file68  file77  file86  file95
file14   file23  file32  file41  file50  file6   file69  file78  file87  file96
file15   file24  file33  file42  file51  file60  file7   file79  file88  file97
file16   file25  file34  file43  file52  file61  file70  file8   file89  file98
file17   file26  file35  file44  file53  file62  file71  file80  file9   file99

3) Empty directory called dir2.

Then,

4)  Contents of dir1 to dir2 on the same system, type:

rsync -r dir1/ dir2

The -r option means recursive, which is necessary for directory syncing.

5)  Use the -a flag instead:

rsync -a dir1/ dir2

The -a option is a combination flag.

It stands for “archive” and syncs recursively and preserves symbolic links, special and device files, modification times, group, owner, and permissions.

It is more commonly used than -r and is usually what you want to use.

Advantages of Rsync

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


Vishwajit Kale
Vishwajit Kale blazed onto the digital marketing scene back in 2015 and is the digital marketing strategist of Hostripples, a company that aims to provide affordable web hosting solutions. Vishwajit is experienced in digital and content marketing along with SEO. He's fond of writing technology blogs, traveling and reading.

Recent Posts

Updated cPanel License Price in Jan 2025: A Comprehensive Guide

Are you ready for another cPanel price adjustment? As we have approached January 2025, cPanel has rolled out significant changes…

2 weeks ago

Finding Your Fit: Website Builder or WordPress for Your Site?

In this growing digital world, having a website is not enough—it’s a crucial and much-needed option. But here's the challenge…

2 weeks ago

From Hobbyist to Professional: Selling Photos Online

In today's digital age, the line between hobby photography and professional photography has become increasingly blurred. With the rise of…

3 weeks ago

Windows Web Hosting: Essential Insights for Beginners

Are you taking your first steps into the world of web hosting? You're not alone. Every day, countless individuals and…

3 weeks ago

Crafting a Professional Email: Step-by-Step Guide

Due to growing digitalization, Email Communication has become the backbone of professional interactions. Yet, surprisingly, many professionals struggle to craft…

1 month ago