系統(tǒng)之家 - 系統(tǒng)光盤下載網(wǎng)站!

當(dāng)前位置:系統(tǒng)之家 > 系統(tǒng)教程 > Linux安裝配置rsync和sersync

Linux安裝配置rsync和sersync的方法(4)

時(shí)間:2015-01-04 15:45:53 作者:qipeng 來(lái)源:系統(tǒng)之家 1. 掃描二維碼隨時(shí)看資訊 2. 請(qǐng)使用手機(jī)瀏覽器訪問(wèn): https://m.xitongzhijia.net/xtjc/20150104/33943.html 手機(jī)查看 評(píng)論

  代碼如下:

  《?xml version=“1.0” encoding=“ISO-8859-1”?》

  《head version=“2.5”》

  《host hostip=“localhost” 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=“false”/》

  《modify start=“false”/》

  《/inotify》

  《sersync》

  《localpath watch=“/home/www.jb51.com”》

  《remote ip=“192.168.21.127” name=“home_www.jb51.net”/》

  《remote ip=“192.168.21.128” name=“home_www.jb51.net”/》

  《!--《remote ip=“192.168.8.40” name=“tongbu”/》--》

  《/localpath》

  《rsync》

  《commonParams params=“-artuz”/》

  《auth start=“true” users=“home_www.jb51.net_user” passwordfile=“/etc/rsync.pas”/》

  《userDefinedPort start=“false” port=“874”/》《!-- port=874 --》

  《timeout start=“false” time=“100”/》《!-- timeout=100 --》

  《ssh start=“false”/》

  《/rsync》

  《failLog path=“/tmp/rsync_fail_log.sh” timeToExecute=“60”/》《!--default every 60mins execute once--》

  《crontab start=“true” 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--》

  《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=“《a href=”https://pic.xoyo.com/cms“/”》https://pic.xoyo.com/cms“/《/a》》

  《regexurl regex=”false“ match=”cms.xoyo.com/site([/a-zA-Z0-9]*).xoyo.com/images“/》

  《/localpath》

  《/plugin》

  《/head》

 。簑q! #保存退出

  參數(shù)說(shuō)明:

  代碼如下:

  localpath watch=”/home/www.jb51.net“:#源服務(wù)器同步目錄

  192.168.21.127,192.168.21.128:#目標(biāo)服務(wù)器IP地址

  name=”home_www.jb51.net“: #目標(biāo)服務(wù)器rsync同步目錄模塊名稱

  users=”home_www.jb51.net_user“: #目標(biāo)服務(wù)器rsync同步用戶名

  passwordfile=”/etc/passwd.txt“: #目標(biāo)服務(wù)器rsync同步用戶的密碼在源服務(wù)器的存放路徑

  remote ip=”192.168.21.127“: #目標(biāo)服務(wù)器ip,每行一個(gè)

  remote ip=”192.168.21.128“: #目標(biāo)服務(wù)器ip,每行一個(gè)

  failLog path=”/tmp/rsync_fail_log.sh“ #腳本運(yùn)行失敗日志記錄

  start=”true“ #設(shè)置為true,每隔600分鐘執(zhí)行一次全盤同步

  5、設(shè)置sersync監(jiān)控開(kāi)機(jī)自動(dòng)執(zhí)行

  vi /etc/rc.d/rc.local #編輯,在最后添加一行

  代碼如下:

  /usr/local/sersync/sersync2 -d -r -o /usr/local/sersync/confxml.xml #設(shè)置開(kāi)機(jī)自動(dòng)運(yùn)行腳本

 。簑q! #保存退出

標(biāo)簽 rsync sersync

發(fā)表評(píng)論

0

沒(méi)有更多評(píng)論了

評(píng)論就這些咯,讓大家也知道你的獨(dú)特見(jiàn)解

立即評(píng)論

以上留言僅代表用戶個(gè)人觀點(diǎn),不代表系統(tǒng)之家立場(chǎng)

其他版本軟件

熱門教程

人氣教程排行

Linux系統(tǒng)推薦

官方交流群 軟件收錄