<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>系统运维 &#187; sersync</title>
	<atom:link href="http://www.osyunwei.com/archives/tag/sersync/feed" rel="self" type="application/rss+xml" />
	<link>https://www.osyunwei.com</link>
	<description>国产化OS/AnolisOS/openEuler/RHEL/CentOS/Rocky Linux/Debian/Ubuntu Linux FreeBSD 服务器教程 &#124; Windows Server 2003/2008/2012/2016/2019/2022/2025服务器教程</description>
	<lastBuildDate>Wed, 01 Apr 2026 08:27:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Linux下Rsync+sersync实现数据实时同步</title>
		<link>https://www.osyunwei.com/archives/7447.html</link>
		<comments>https://www.osyunwei.com/archives/7447.html#comments</comments>
		<pubDate>Tue, 11 Mar 2014 02:27:02 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Inotify]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Rsync]]></category>
		<category><![CDATA[sersync]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=7447</guid>
		<description><![CDATA[前言： 一、为什么要用Rsync+sersync架构? 1、sersync是基于Inotify开发的，类似于Inotify-tools的工具 2、sersync可以记录下被监听目录中发生变化的（包括增加、删除、修改）具体某一个文件或某一个目录的名字，然后使用rsync同步的时候，只同步发生变化的这个文件或者这个目录。 二、Rsync+Inotify-tools与Rsync+sersync这两种架构有什么区别？ 1、Rsync+Inotify-tools （1）：Inotify-tools只能记录下被监听的目录发生了变化（包括增加、删除、修改），并没有把具体是哪个文件或者哪个目录发生了变化记录下来； （2）：rsync在同步的时候，并不知道具体是哪个文件或者哪个目录发生了变化，每次都是对整个目录进行同步，当数据量很大时，整个目录同步非常耗时（rsync要对整个目录遍历查找对比文件），因此，效率很低。 2、Rsync+sersync （1）：sersync可以记录下被监听目录中发生变化的（包括增加、删除、修改）具体某一个文件或某一个目录的名字； （2）：rsync在同步的时候，只同步发生变化的这个文件或者这个目录（每次发生变化的数据相对整个同步目录数据来说是很小的，rsync在遍历查找比对文件时，速度很快），因此，效率很高。 小结：当同步的目录数据量不大时，建议使用Rsync+Inotify-tools；当数据量很大（几百G甚至1T以上）、文件很多时，建议使用Rsync+sersync。 说明： 操作系统：CentOS 5.X 源服务器：192.168.21.129 目标服务器：192.168.21.127，192.168.21.128 目的：把源服务器上/home/www.osyunwei.com目录实时同步到目标服务器的/home/www.osyunwei.com下 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容 版权所有,转载请注明出处及原文链接 具体操作： 第一部分：分别在两台目标服务器192.168.21.127，192.168.21.128上操作 一、分别在两台在目标服务器安装Rsync服务端 1、关闭SELINUX vi /etc/selinux/config #编辑防火墙配置文件 #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq! #保存，退出 setenforce 0 #立即生效 2、开启防火墙tcp 873端口（Rsync默认端口） vi /etc/sysconfig/iptables #编辑防火墙配置文件 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/7447.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/7447.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
