nfs01安装sersync(二进制)
配置sersync_installdir_64bit/sersync/conf/confxml.xml
<fileSystem xfs="true"/> <!--centos7 xfs 文件系统-->
<inotify> <!--监控哪些事件-->
<delete start="true"/>
<createFolder start="true"/>
<createFile start="true"/>
<closeWrite start="true"/>
<moveFrom start="true"/>
<moveTo start="true"/>
<attrib start="true"/>
<modify start="true"/>
</inotify>
<sersync>
<localpath watch="/data"> <!--监控本地的哪个目录,发生了哪些inotify事件,
推送到哪个服务器的哪个模块-->
<remote ip="172.16.1.41" name="data"/>
<rsync>
<commonParams params="-avz"/>参数
<auth start="true" users="rsync_backup" passwordfile="/etc/rsync.passwd"/>
认证用户和密码放置文件 密码文件设置权限
<userDefinedPort start="false" port="874"/><!-- port=874 -->
<timeout start="true" time="100"/><!-- timeout=100 -->
超时时间
sersync_installdir_64bit/sersync/bin/sersync +x权限
sersync_installdir_64bit/sersync/bin/sersync -rdo sersync_installdir_64bit/sersync/conf/confxml.xml
启动该服务(rsync客户端配置好的情况下)
实时同步工具选择
rsync+inotify
sersync
lsyncd