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>
  • 相关阅读:
    优酷土豆的Redis服务平台化之路
    [C#]使用Gembox.SpreadSheet向Excel写入数据及图表
    [C#]使用Join与GroupJoin将两个集合进行关联与分组
    [C#]使用TcpListener及TcpClient开发一个简单的Chat工具
    超棒黑客必备清单
    [C#]使用dnSpy对目标程序(EXE或DLL)进行反编译修改并编译运行
    [C#源代码]使用SCPI指令对通信端口(RS232/USB/GPIB/LAN)进行仪器编程
    [C#]使用Costura.Fody将源DLL合并到目标EXE
    [C#]使用ILMerge将源DLL合并到目标EXE(.NET4.6.2)
    详解C#7.0新特性
  • 原文地址:https://www.cnblogs.com/fanpiao/p/12785543.html
Copyright © 2011-2022 走看看