找回密码
 开放注册

QQ登录

只需一步,快速开始

微信登录

微信扫码,快速开始

搜索
查看: 737|回复: 0

用sersync进行实时同步数据 (1)

[复制链接]

155

主题

15

回帖

360

牛毛

一级牛人

积分
360
发表于 2011-9-28 13:30:40 | 显示全部楼层 |阅读模式 来自 河北省石家庄市
  同步目标服务器
  Vim /etc/rsyncd.conf
uid=root  gid=root  max connections=36***00  use chroot=no log file=/var/log/rsyncd.log  pid file=/var/run/rsyncd.pid  lock file=/var/run/rsyncd.lock     [web]  path=/data0/web  comment  =  McShell web  ignore errors = yes  read only = no hosts allow =  10.1.0.0/24  hosts deny = *
编辑完之后执行rsync –daemon 开启守护进程
剩下的服务器都一样配置。

同步服务器的confxml.xml如下

<?xml version="1.0" encoding="ISO-8859-1"?> <head version="2.2">     <host hostip="10.1.0.2" port="8008"></host>     <filter start="false">         <exclude expression="(.*)\.gz"></exclude>         <exclude expression="^info/*"></exclude>     </filter>     <sersync>         <localpath watch="/data0/web " debug="false">             <remote ip="10.1.0.4" name="web"/>             <remote ip="10.1.0.5" name="web"/>             <remote ip="10.1.0.6" name="web"/>                <!--<remote ip="192.168.8.39" name="tongbu"/>-->         </localpath>            <rsyncauth start="flase" users="www" passwordfile="/etc/rsync.pas"/>         <crontab start="false" schedule="600">             <crontabfilter start="false">                 <exclude expression="*.php"></exclude>                 <exclude
本文由:SKF轴承 http://wwww.9-zc.com 整理发布
您需要登录后才可以回帖 登录 | 开放注册

本版积分规则

帮助|Archiver|小黑屋|通信管理局专项备案号:[2008]238号|NB5社区 ( 皖ICP备08004151号;皖公网安备34010402700514号 )

GMT+8, 2025-4-25 03:17 , Processed in 0.161371 second(s), 33 queries .

Powered by Discuz! X3.5

快速回复 返回顶部 返回列表