Rsync+inotify Real-time data synchronization

Source: Internet
Author: User
Tags inotify rsync

Yum Install rsync

Yum Install-y rsync

Vi/etc/xinetd.d/rsync

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/8C/27/wKioL1hjsUjRX-9YAABbRJmQ7aE848.png "title=" 1.png " alt= "Wkiol1hjsujrx-9yaabbrjmq7ae848.png"/>


Yum Install-y xinet*

/etc/init.d/xinetd start


650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/8C/27/wKioL1hjsXqxdNZjAAAWFWNhYp0929.png "title=" 2.png " alt= "Wkiol1hjsxqxdnzjaaawfwnhyp0929.png"/>

The above is the installation service, in many cases only with this command can be, do not need to install this service


Vim/etc/rsync D . conf // the rsyncd.conf does not exist and needs to be built manually  


port=873

Log File=/var/log/rsync.log #指定日志

PID File=/var/run/rsyncd.pid #指定pid


[Test] #为模块名, custom

Path=/root/rsync # Specifies which directory the module corresponds to

Use Chroot=true #是否限定在该目录下, the default is true, when there is a soft connection, you need to change to Fasle

Max Connections=4 # Specifies the maximum number of clients that can be connected

Read Only=no //yes Specifies that the client has only read-only permissions to the shared directory,no read- write and upload permissions, and the shared directory must have a W Write permission to upload

List=true #是否可以列出模块名

Uid=victor #以哪个用户的身份来传输

Gid=victor #以哪个组的身份来传输

Auth Users=test #指定验证用户名, can not be set

Secrets file=/etc/rsyncd.passwd #指定密码文件, if you set the authentication user, this item must be set

Hosts ALLOW=104.193.95.0/24



hosts allow = 104.193.95.63 (can also write an IP, do not write user name and password,)

Mkdir-p/root/rsync

/etc/init.d/xinetd restart

Rsync--daemon

vi/etc/rsyncd.passwd

Victor:sx3edc!23

chmod 600/etc/rsyncd.passwd


On the client:

vi/etc/rsyncd.passwd

Sx3edc!23

chmod 600/etc/rsyncd.passwd

RSYNC-AVP--password-file=/etc/rsyncd.passwd/etc/passwd [Email protected]::test



This article is from the It Dick thread blog, so be sure to keep this source http://68686789.blog.51cto.com/10438688/1887088

Rsync+inotify Real-time data synchronization

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.