How Rsync Works and Sersync

Source: Internet
Author: User
Tags scp command

How Rsync works

    1. Data transfer between a single host local (this is similar to the functionality of the CP command).

    2. With the RCP,SSH equivalent to the arrival transfer data (this time resembles the function of the SCP command).

    3. Transfer data as a daemon (socket) (This is an important function of rsync itself).


    1. Cp-a/etc/hosts/tmp/rsync-avz/etc/hosts/tmp/rsync--delete/null/tmp/
    2. Push scp/etc/hosts ***@********:/tmp/push rsync-avz-e ' ssh '/etc/hosts ***@********:/tmp/pull SCP ***@********:/etc/hosts/ tmp/pull rsync-avz-e ' ssh ' ***@********:/etc/hosts/tmp/
    3. Daemon Mode backup topology

      650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/70/9C/wKioL1W6IwyR7f6QAAD_giILwBM784.jpg "title=" QQ picture 20150730210452.png "alt=" Wkiol1w6iwyr7f6qaad_giilwbm784.jpg "/>

      Creating a configuration file/etc/rsyncd.conf

#rsyncd_config start

UID = rsync

GID = rsync

Use chroot = no

Max connections = 200

Timeout = 300

PID file =/var/run/rsyncd.pid

Lock file =/var/run/rsyncd.lock

Log file =/var/log/rsyncd.log

[Oldboy]

Path =/oldboy/

Ignore errors

Read Only = False

List = False

Hosts allow = 10.0.0.0/24

Hosts Deny = 0.0.0.0/32

Auth users = Rsync_backup

Secrets file =/etc/rsync.password

#rsync_config End


Rsync Common parameters-avz or-VZRTOPG

-v Verbose mode output, transfer progress information, etc.

-Z compression during transfer to improve transfer efficiency,--compress-level=num can be compressed by level

-a archive mode, which means that files are transferred recursively, and all file attributes are maintained, equal to-RTOPGDL.

-R Sub-directory in recursive mode

-T hold file time information

-O Keep File owner information

-P Maintain file permissions

-G hold File group information

-P Display the synchronization process and the progress of the transmission and other information

-D Keep Device file information

-L Keep Soft links

-E Specify Channel

--exclude=pattern Exclude Files Matching PATTERN

--exclude-from=file read exclude patterns from FILE


How Rsync Works and Sersync

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.