<?xml version="1.0" encoding="ISO-8859-1"?>
<head version="2.5">
<!--本地主机地址-->
<host hostip="10.2.22.27" port="8008"></host>
<!--是否打开调试信息-->
<debug start="false"/>
<fileSystem xfs="false"/>
<!--是否过滤,是否排除名称中含有制定字符串的文件的同步-->
<filter start="false">
<exclude expression="(.*)\.svn"></exclude>
<exclude expression="(.*)\.gz"></exclude>
<exclude expression="^info/*"></exclude>
<exclude expression="^static/*"></exclude>
</filter>
<inotify>
<delete start="true"/>
<createFolder start="true"/>
<createFile start="false"/>
<closeWrite start="true"/>
<moveFrom start="true"/>
<moveTo start="true"/>
<attrib start="true"/>
<modify start="true"/>
</inotify>
<sersync>
<!--本地需要监视的目录-->
<localpath watch="/data/sersync/">
<!--目的段IP地址和rsync同步子项的服务名-->
<remote ip="10.2.22.27" name="sersync_test"/>
<!--理论上如果有多个目的端,可在此逐个列出,最好启用新实例,每个实例配置一个地址和服务名-->
<!--<remote ip="192.168.8.39" name="tongbu"/>-->
<!--<remote ip="192.168.8.40" name="tongbu"/>-->
</localpath>
<rsync>
<!--sersync调用rsync时的参数配置段-->
<commonParams params="-artuz"/>
<auth start="false" users="root" passwordfile="/etc/rsync.pas"/>
<userDefinedPort start="false" port="874"/><!-- port=874 -->
<timeout start="false" time="100"/><!-- timeout=100 -->
<ssh start="false"/>
</rsync>
<!--指定如果同步失败,记录到哪个文件,以便在60分钟后尝试重传-->
<failLog path="/tmp/rsync_fail_log.sh" timeToExecute="60"/><!--default every 60mins execute once-->
<!--指定多长时间间隔执行一次完整同步-->
<crontab start="false" schedule="600"><!--600mins-->
<!--可以过滤哪些不同步-->
<crontabfilter start="false">
<exclude expression="*.PHP"></exclude>
<exclude expression="info/*"></exclude>
</crontabfilter>
</crontab>
<plugin start="false" name="command"/>
</sersync>
<plugin name="command">
<param prefix="/bin/sh" suffix="" ignoreError="true"/> <!--prefix /opt/tongbu/mmm.sh suffix-->
<include expression="(.*)\.PHP"/>
<include expression="(.*)\.sh"/>
</plugin>
<plugin name="socket">
<localpath watch="/opt/tongbu">
<deshost ip="192.168.138.20" port="8009"/>
<plugin name="refreshCDN">
<localpath watch="/data0/htdocs/cms.xoyo.com/site/">
<cdninfo domainname="ccms.chinacache.com" port="80" username="xxxx" passwd="xxxx"/>
<sendurl base="http://pic.xoyo.com/cms"/>
<regexurl regex="false" match="cms.xoyo.com/site([/a-zA-Z0-9]*).xoyo.com/images"/>
</head>
原文链接:https://www.f2er.com/xml/295920.html