zoukankan      html  css  js  c++  java
  • sersync2 填坑记录

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <head version="2.5">
        <host hostip="localhost" port="8008"></host>
        <debug start="false"/>
        <fileSystem xfs="true"/>
        <filter start="true">
            <exclude expression="(.*).svn"></exclude>
            <exclude expression="(.*).gz"></exclude>
            #这个地方如果要排除目录,目录后面要加/d* 这才是正则的写法
            <exclude expression="^static/[0-9]/d*"></exclude>                
            <exclude expression="^static/[0-9][0-9]/d*"></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="/tmp/test/file/www/">
                <remote ip="192.168.18.33" name="opt"/>
            </localpath>
            <rsync>
                <commonParams params="-artu"/>
                <auth start="true" users="j" passwordfile="/etc/rsyn.sec"/>
                <userDefinedPort start="false" port="874"/><!-- port=874 -->
                <timeout start="false" time="100"/><!-- timeout=100 -->
                <ssh start="false"/>
            </rsync>
            <failLog path="/tmp/rsync_log.sh" timeToExecute="60"/><!--default every 60mins execute once-->
            <crontab start="true" schedule="3"><!--600mins-->
                <crontabfilter start="true">
                <exclude expression="(.*).svn"></exclude>
                <exclude expression="(.*).gz"></exclude>
                #同步没成功的文件,这里需要符合rsync的用法,不能^static/[0-9]/d* 这样用,否则不成功
                <exclude expression="static/[0-9]"></exclude>
                <exclude expression="static/[0-9][0-9]"></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-->
            <filter start="false">
                <include expression="(.*).php"/>
                <include expression="(.*).sh"/>
            </filter>
        </plugin>
     
    </head>
  • 相关阅读:
    Android开发之Path类使用详解,自绘各种各样的图形!
    json数值和结构
    ajax异步请求不能刷新数据的问题
    关于javaBean中boolean类型变量的set和get注入后传到前端JS中的问题
    Js中的window.parent ,window.top,window.self详解
    db2中修改表字段的长度,查看表字段长度,以及查看表字段已存放值大小
    db2数据库中查找数据库表
    分页查询SQL
    ibatis动态语句加and 和不加and
    win7计划任务执行BAT文件问题
  • 原文地址:https://www.cnblogs.com/fanpiao/p/12785543.html
Copyright © 2011-2022 走看看