File synchronization between multiple machines in Linux (sersync + rsync)

Source: Internet
Author: User

Sersync: http://code.google.com/p/sersync/

When used, the master server first configures rsync

vi  /etc/rsyncd.conf
uid=rootgid=rootmax connections=36000use chroot=nolog file=/var/log/rsyncd.logpid file=/var/run/rsyncd.pidlock file=/var/run/rsyncd.lock【tongbu】path=/opt/tongbucomment = xoyo video filesignore errors = yesread only = nohosts allow = 192.168.8.40/26 192.168.138.94/24hosts deny = *

The above configuration is directly copied on sersync Google Code and modified as needed

Configure sersync again

<sersync>  <localpath watch="/dir_to_be_watched">   <remote ip="192.168.8.42" name="tongbu"/>   <remote ip="192.168.8.39" name="tongbu"/>  </localpath> </sersync>

The above is the configuration copied directly from sersync Google code. You can directly modify the IP address when using the application.

The target server only needs to start the rsync service.

The sersync website does not describe how to synchronize multiple directories. It looks like adding some localpath nodes, but some netizens say no. You can start multiple processes, at startup, use the-O option to specify the configuration file to synchronize multiple directories (this is not tested yet and will be updated after testing ).

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.