sersync配置
只记录了自己的操作步骤,详细信息也可以参考https://www.cnblogs.com/sellsa/p/5345092.html
安装sersync
将sersync安装包解压后会有两个配置文件
[root@nfs ~]# tar xfz serync.tar.gz
[root@nfs ~]# cd GNU-Linux-x86/
[root@nfs GNU-Linux-x86]# ls
confxml.xml sersync2
将sersync2移到bin目录
将confxml.xml移到存档配置文件的目录
编辑confxml.xml
主要更改配置如下:
<sersync>
<localpath watch="/data"> #需要监视的目录
<remote ip="192.168.56.201" name="backup"/> #需要同步到的服务器和路径
<!--<remote ip="192.168.8.39" name="tong bu"/>-->
<!--<remote ip="192.168.8.40" name="tongbu"/>-->
</localpath>
<rsync>
<commonParams params="-avz"/> #同步内容
<auth start="true" users="rsync_backup" passwordfile="/etc/rsync.password"/>
<userDefinedPort start="false" port="874"/><!-- port=874 -->
<timeout start="false" time="100"/><!-- timeout=100 --> #是否超时100分钟后重新同步
<ssh start="false"/>
</rsync>
<failLog path="/tmp/rsync_fail_log.sh" timeToExecute="60"/><!--default every 60mins execute once-->
<crontab start="false" schedule="600"><!--600mins--> #是否600分钟后全部同步一次
<crontabfilter start="false">
<exclude expression="*.php"></exclude>
<exclude expression="info/*"></exclude>
</crontabfilter>
</crontab>
<plugin start="false" name="command"/>
</sersync>
启动sersync同步功能:(可以将命令添加到rc.local中)
/usr/local/sersync/sersync -d -r -n 8 -o /usr/local/sersync/confxml.xml
[root@nfs GNU-Linux-x86]# /usr/local/sersync/sersync -h
set the system param
execute:echo 50000000 > /proc/sys/fs/inotify/max_user_watches
execute:echo 327679 > /proc/sys/fs/inotify/max_queued_events
parse the command param
_______________________________________________________
参数-d:启用守护进程模式
参数-r:在监控前,将监控目录与远程主机用rsync命令推送一遍
c参数-n: 指定开启守护线程的数量,默认为10个
参数-o:指定配置文件,默认使用confxml.xml文件
参数-m:单独启用其他模块,使用 -m refreshCDN 开启刷新CDN模块
参数-m:单独启用其他模块,使用 -m socket 开启socket模块
参数-m:单独启用其他模块,使用 -m http 开启http模块
不加-m参数,则默认执行同步程序
sersync配置的更多相关文章
- centos6.6配置rsync+sersync实现实时同步分布式多客户端分发同步
1.sersync项目: sersync项目利用inotify与rsync技术实现对服务器数据实时同步到解决方案,其中inotify用于监控sersync所在服务器上文件系统的事件变化,rsync是目 ...
- Inotify&Sersync文件监视工具配置
一.Inotify介绍:一共安装2个工具(命令),即inotifywait和inotifywatchinotifywait:在被监控的文件或目录上等待特定文件系统事件(open.close.delet ...
- sersync 实时同步文件
sersync 主要用于服务器同步,web镜像等功能.sersync是使用c++编写,在结合rsync同步的时候,节省了运行时耗和网络资源.因此更快.sersync配置起来很简单.另外本项目相比较其他 ...
- 第2章 rsync(二):inotify+rsync详细说明和sersync
本文目录: inotify+rsync 1.1 安装inotify-tools 1.2 inotifywait命令以及事件分析 1.3 inotify应该装在哪里 1.4 inotify+rsync示 ...
- Sersync+Rsync实现触发式文件同步
背景 通常我们在服务器上使用rsync加上crontab来定时地完成一些同步.备份文件的任务.随着业务和应用需求的不断扩大.实时性要求越来越高.一般rsync是通过校验所有文件后,进行差量同步,如果文 ...
- Rsync+sersync实现数据实时同步
前言: 一.为什么要用Rsync+sersync架构? 1.sersync是基于Inotify开发的,类似于Inotify-tools的工具 2.sersync可以记录下被监听目录中发生变化的(包括增 ...
- Rsync+sersync实现实时同步
介绍: sersync主要用于服务器同步,web镜像等功能.基于boost1.43.0,inotify api,rsync command.开发.目前使用的比较多的同步解决方案是inotify-too ...
- sersync之不洗澡
inotiry图片参考 sersync图片参考 inotify文字教程 该软件对系统有要求,内核2.6以上,并且有如下目录,后面会讲解三个文件用途 [root@jokerpro ~]# uname - ...
- rsync+sersync多线程实时同步
一.sersync优点 1)使用c++编写,对linux系统文件产生的临时文件和重复文件操作会进行过滤,在结合rsync同步的时候,会减少运行时消耗的本地及网络资源,因此速度更快. 2)相比较inot ...
随机推荐
- android studio (安卓开发)如何使用外部模拟器(mumu模拟器)调试运行程序
开发安卓 我觉得大家明白自带的模拟器卡的要死而且启动慢(我觉得八核的计算机应该可以解决这个问题),这里使androidstudio 使用外部模拟器 MuMu模拟器 配置方法 eclipse 开发安卓 ...
- (九)微信小程序---for指令
对于数据是列表 wxml <view wx:for="{{dataList}}">{{index}}-{{item}}</view> 我们可以看到上面的代码 ...
- S7-300数据处理基本知识(结尾以MW8+1 ADD指令实训仿真,并用状态表监控及刷写变量)
数据处理基本知识汇总 STEP7 的数据类型包括什么? 基本数据类型 复杂数据类型 用于FB(功能块)的输入,输出参数类型 用于FC(功能)的输入,输出参数类型 基本数据类型是什么? 先列举12种数据 ...
- GNS3 模拟icmp禁止不可达
R1 : conf t int f0/0 no shutdown ip add 192.168.1.1 255.255.255.0 no ip routing end R2 f0/0: conf t ...
- dedecms调用当前栏目的子栏目及子栏目文章
{dede:channelartlist} <ul> {dede:arclist titlelen='60' row='8'} <img src=" ...
- PlayJava SpringMVC与Struts2杂谈
一 先做一个简单对比: 1. SpringMVC的入口是Servlet,核心是DispatcherServlet,Struts2是Filter,核心是FilterDispatcher 2. Sprin ...
- Python 中 unittest 框架加载测试用例的常用方法
unittest 当中为我们提供了许多加载用例的方法,这里说下常用的两种方法...推荐使用第二种 第一种加载测试用例的方法:使用加载器加载两个模块 需要把所有的模块加载到套件中 那么就可以自动的运行所 ...
- 吴裕雄 Bootstrap 前端框架开发——Bootstrap 字体图标(Glyphicons):glyphicon glyphicon-qrcode
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name ...
- SciKit-Learn 数据集基本信息
## 保留版权所有,转帖注明出处 章节 SciKit-Learn 加载数据集 SciKit-Learn 数据集基本信息 SciKit-Learn 使用matplotlib可视化数据 SciKit-Le ...
- junit基础学习之-多线程测试(6)
步骤: 1.定义单个TestRunner 2.重载单个TestRunner的runTest() 3.定义TestRunner数组,并添加多个TestRunner 4.MultiThreadedTest ...