Backup command rsync

The command-line utility rsync is the most widely used backup command in Linux for backing up or synchronizing data. This utility was developed in 1996 by Andrew Tridgell and Paul Mackerras.

This utility is mostly installed in all popular Linux distributions. If it is not installed, then run the following commands:

For CentOS or Red Hat:

    # yum install rsync

For Debian or Ubuntu

    # apt-get install rsync

rsync is a powerful utility. It can copy or synchronize files in the same computer or across the network in another continent-based computer over the internet.

The basic syntax for using rsync is as follows:

    $ rsync -options source_folder destination_folder

Let us consider that you want to copy from /home/student/data_folder ...

Get Learning Linux Shell Scripting - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.