RSync Command to Backup and Synchronize Files in Linux

278

RSync or Remote Sync is the Linux command usually used for backup of files/directories and synchronizing them locally or remotely in an efficient way. One of the reasons of why RSync is preferred over all other alternatives is the speed of operation, RSync copies the chunk of data to other location at a significantly faster rate. This is because, whenever Rsync is executed for the very first occasion, it transfers all the data from source to the destination. On the next turn, it would just copy the files/directories whose contents are changed.

    Another plus point of using this utility is, as it makes use of SSH protocol to encrypt the data to be replicated, so it is much more secure and trustworthy. One more advantage of using Rsync is, as it performs compression of the data at source end and decompresses it at the destination, the bandwidth used during the sync operation will be considerably less. Also, the file permissions, their user/group information and the timestamps is/can be preserved.

Syntax:

rsync [OPTIONS] SOURCE DESTINATION

Important Options:
-v : indicates Verbose mode which provides detailed information.
-r : indicates Recursive operation, timestamps and file permissions are not preserved
-a : indicates Archive mode,timestamps and file permissions are preserved
-z : indicates Compression, it compresses the data before it is transferred to destination.
-h : indicates Human Readable output format.

Read More at YourOwnLinux.