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 ).