Linux Daily Maintenance (rsync Introduction, common options, rsync six modes)

Source: Internet
Author: User
Tags rsync

I. Introduction of Rsync


The rsync command is a remote data synchronization tool that enables fast synchronization of files between multiple hosts via Lan/wan. Rsync uses the so-called "rsync algorithm" to synchronize files between local and remote two hosts, which transmits only the different portions of two files, rather than the entire transfer every time, so it is quite fast.

The literal meaning you can understand as remote sync (remotely synced) can make you understand more deeply. Rsync can not only synchronize data remotely (similar to SCP [1]), but can also synchronize data locally (similar to CP), but unlike CP or SCP, rsync does not overwrite previous data like CP/SCP (if the data already exists), It will first determine the difference between the existing data and the new data, and only the different parts will be overwritten. If your Linux does not have the rsync command please use yum install-y rsync installation.


Second, rsync common options

Rsync

A?? Contains the-rtplgod

-r?? When synchronizing the directory, add the-r option like CP

V?? Show some information when synchronizing, let us know the process of synchronization

-l?? Keep Soft connections

-l?? After adding this option, synchronize the source files of the soft connection (if there is no source file in the other machine, the synchronization software connection is not valid in the past)

-P?? Keep File Permissions Property

-O?? Maintain a stable owner

-G?? Maintain a robust group of genera

-d?? Keep Device file information

T?? Keep the file time property

-P?? Shows the synchronization process, such as rate, more detailed than-V

-U?? If the target file is newer than the source file, it is out of sync with the new primary in the target file

Z?? Transfer-time compression (speeds up transfer and saves bandwidth)

--delte. Delete files that are not in the source directory in the destination directory

--exclude?? Filter the specified file, such as--exclude "logs" will be the file name contains logs files or directories filtered out of sync


Iii. Six modes of rsync


the pictures come from: http://blog.csdn.net/mrding991124/article/details/78735957

Linux Daily Maintenance (rsync Introduction, common options, rsync six modes)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.