rsync 07-confxml.xml配置文件

[root@centos6]# cat confxml.xml
<?xml version="1.0" encoding="UTF-8"?>
<head version="2.5">
    <!-- 设置本地IP和端口 -->
    <host hostip="localhost" port="8008"></host>
    <!-- 开启DUBUG模式  -->
	<debug start="false"/>
    <!-- 开启xfs文件系统 -->
    <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="false"/>
        <createFolder start="true"/>
        <createFile start="false"/>
        <closeWrite start="true"/>
        <moveFrom start="true"/>
        <moveTo start="true"/>
        <attrib start="false"/>
        <modify start="false"/>
    </inotify>

    <sersync>
  	<!-- 本地监视目录路径 -->
        <localpath watch=" /data/bakup/"> 
			<!-- 定义同步Server ip和模块 -->
            <remote ip="192.168.0.132" name="bakup"/>
        </localpath>

		<rsync>
			<!-- rsync指令参数 -->
            <commonParams params="-artuz"/>
            <!--  rsync同步认证 -->
            <auth start="true" users="rsync_bakup" passwordfile="/etc/rsyncd.password"/>
            <!-- 设置rsync远程服务端口,非默认端口需要打开自定义(若开启rsync+ssh, 则这里需定义SSH端口) -->
            <userDefinedPort start="false" port="873"/>
			<!-- 设置超时时间 -->
            <timeout start="ture" time="100"/>
			<!-- 设置rsync+ssh加密传输模式,默认关闭,开启需设置SSH加密证书 -->
            <ssh start="false"/>
        </rsync>

		<!-- sersync传输失败日志脚本路径,每隔60会重新执行该脚本,执行完毕会自动清空。 -->
        <failLog path="/usr/local/sersync/logs/rsync_fail_log.sh" timeToExecute="60"/>
			<!-- 设置rsync定时传输,默认关闭 -->
	        <crontab start="false" schedule="600">
	            <crontabfilter start="false">
	                <exclude expression="*.php"></exclude>
	                <exclude expression="info/*"></exclude>
	            </crontabfilter>
	        </crontab>

			<!-- 设置sersync传输后调用name指定的插件脚本,默认关闭 -->
        <plugin start="false" name="command"/>
    </sersync>

    <!-- 插件脚本范例 -->
    <plugin name="command">
        <param prefix="/bin/sh" suffix="" ignoreError="true"/> <!--prefix /opt/tongbu/mmm.sh suffix-->
        <filter start="false">
            <include expression="(.*)\.php"/>
            <include expression="(.*)\.sh"/>
        </filter>
    </plugin>

    <!-- 插件脚本范例 -->
    <plugin name="socket">
        <localpath watch="/opt/tongbu">
            <deshost ip="192.168.138.20" port="8009"/>
        </localpath>
    </plugin>
    <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"/>
        </localpath>
    </plugin>
</head>
posted @ 2018-10-09 10:59  瞎搞的富哥  阅读(404)  评论(0编辑  收藏  举报