Sersync 是我们金山逍遥网技术支持部平台组周洋同学,开发的一款基于 inotify + rsync 的大量文件的多服务器自动同步程序,目前已开源,开源协议为 New BSD License。

  原理:
  使用 Linux 2.6 内核的 inotify 监控 Linux 文件系统事件,被监听目录下如果有文件发生修改,sersync 将通过内核自动捕获到事件,并将该文件利用 rsync 同步到多台远程服务器。sersync 仅仅同步发生增、删、改事件的单个文件或目录,不像rsync镜像同步那样需要比对双方服务器整个目录下数千万的文件,并且支持多线程同步,因此效率非常高。

  应用:
  金山游戏官网的 CMS 内容发布系统。无论编辑通过 Web 还是 FTP 上传图片、视频、附件,还是系统工程师直接去CMS发布服务器上增加、修改、删除文件,干完这些事情后不用做任何处理,sersync 会自动将发生增、删、改事件的文件同步到远程服务器,并可以在文件同步完成后,自动调用 CDN(ChinaCache)缓存刷新接口,刷新发生修改、删除的文件的访问 URL。

  更多内容,请访问项目网址:http://code.google.com/p/sersync/






技术大类 » 其他Unix技术 | 评论(78) | 引用(0) | 阅读(101200)
allen
2010-6-24 12:00
sersync服务器上有两个目录需要同步,我该如何设置呢,如/opt/tongbu1/和/home/tongbu2/,谢谢
cyyyyy
2010-7-17 21:31
为啥不用pyinotify,修改部署更方便
ping Email Homepage
2010-9-20 15:19
高效率的东西啊,不错
csuper Email
2010-11-14 21:19
有配置实例不?

同步支持垮平台不   比如我的主服是centos   备用的服务器是windows的  我要怎么配置?
yy
2010-12-23 10:03
经过百余年的借鉴、融合、探索、创造的中国油画,在新世纪更显现出融入中华民族血液的自觉意识,人文精神的高扬及对现实的关怀,题材内容、形式风格和手法的多样化成为当代油画家的重要特征。此信息由
西安人才网:http://www.xa198.com
中国画廊网:http://www.hl198.com  
中国画家网:http://www.rc900.com
提供!
近日,“今日之神话——庞茂琨个展”在上海美术馆开幕。2009-2010年创作的近20幅油画作品,以及60幅这些油画创作的部分草图、手稿等,构成了被誉为“天才学院画家”的庞茂琨在内地的首次大型个展。
clairelume Email Homepage
2011-6-2 13:36
FreeBSD 下能用吗?
燕奔
2011-7-14 14:22
sersync双机实时同步的问题,两台机器,..双向实时同步,有一台serync服务启动不了,一启动就报错..
notify_add_watch error: No such file or directory
terminate called after throwing an instance of 'std::out_of_range'
what():  basic_string::substr

系统2.6.18-164.el5 x86_64
sersync2.5_64bit_binary_stable_final.tar.gz
rsync3.0.8

rsync3.0.8定时,手工运行同步都正常,就是运行sersync有问题.

到底为什么??
燕奔
2011-7-14 14:26
不让写太多字,这个把配置贴上来.
到底为什么??
再把confxml.xml配置贴上来..
<?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="false"/>
        <createFolder start="true"/>
        <createFile start="true"/>
        <closeWrite start="true"/>
        <moveFrom start="true"/>
        <moveTo start="true"/>
        <attrib start="true"/>
        <modify start="true"/>
    </inotify>

    <sersync>
        <localpath watch="/opt/netfile">
            <remote ip="192.168.19.101" name="web_tongbu"/>
            <!--<remote ip="192.168.8.39" name="tongbu"/>-->
            <!--<remote ip="192.168.8.40" name="tongbu"/>-->
        </localpath>
        <rsync>
            <commonParams params="-artuz"/>
            <auth start="false" users="root" passwordfile="/etc/rsync.pas"/>
  <userDefinedPort start="true" port="873"/><!-- port=874 -->
            <timeout start="false" time="100"/><!-- timeout=100 -->
            <ssh start="false"/>
        </rsync>
        <failLog path="/tmp/rsync_fail.log" timeToExecute="60"/><!--default every 60mins execute once-->
        <crontab start="false" schedule="600"><!--600mins-->
            <crontabfilter start="false">
                <exclude expression="*.php"></exclude>
                <exclude expression="info/*"></exclude>
            </crontabfilter>
        </crontab>
        <plugin start="false" name="command"/>
    </sersync>
</head>
clairelume Email Homepage
2011-7-16 14:12
这个只能在linux内核下运行,不知道freebsd下有没有此类的同步软件?
trooper
2011-8-12 14:47
求freebsd 解决方案
louis vuitton uk Email Homepage
2011-11-23 09:29
This louis vuitton uk for sale belongs to the sounding just what are termed as Louis Vuitton vintage best sellers, many other products and services for the reason that range appearing companies.You will easily notice the unfold zippers of this coach outlet store online. That is the decoration. There are some inside pockets for you as well. They are easy to match your clothes and to carry.Let us inspire your inner beauty with fine christian louboutin sale. Purse the elegance in bridal wedding. Enjoy the fashion.
wedding520 Email Homepage
2011-12-27 15:54
ワイドネックライン、'V'ネックやボートネックラインは、一般にキャップスリーブとドレスのために選ばれている。ボートスタイルのネックラインと幅広いネックラインのためには、オフショルダーのキャップスリーブを追加することができます。オフショルダーのウエディングドレスは、数年以来、結婚式の摩耗で人気のパターンになっても流行で、今日でもあります。カラードレス 格安.のこのスタイルで素敵に見える模様のオフショルダーの袖に行く同じシースのサテンからステッチ/オフショルダーのキャップスリーブの上に薄いと飾ったときに裾フレアのビットとシースのサテンのイブニングドレスとスパゲッティネックラインがすごい見えます。
小白
2012-4-18 10:42
用这套机制产生的工具,做不了海量细碎文件实时增量同步
hogan280 Email
2012-5-10 18:07
Finora, così tipico. Dei 17.000 casi di reati sessuali che coinvolgono bambini sotto i 16 anni solo 4000 è andato in tribunale lo scorso anno, secondo i CPS. Questo è poco meno di un quarto di tutti i casi segnalati. E secondo NSPCC di ricerca, un terzo (34%) dei bambini che vengono abusati sessualmente non dirlo a nessuno in tutto, per non parlare di segnalarlo alla polizia. Eppure il caso della adolescente e il Hogan negozio asporto controtendenza il trend statistico di questa settimana quando le prove della ragazza costituito una parte centrale del processo contro una banda di nove uomini, che sono stati condannati ciascuno a tra i quattro ei 19 anni dopo essere stato giudicato colpevole di 25 bambino reati sessuali, compreso lo stupro e il traffico.
test Email
2012-8-28 22:47
发现一个问题,在使用过程中,使用一段时间以后,突然sersync会对 远端client同步过去的文件全部删除,然后再次进行同步。有谁遇到过没有。
Coach Email Homepage
2012-11-3 14:45
"The Coach Outletengines that will likely power the J-31 we do know a bit mor.Coach Outlet  Those engines were actually revealed at the Zhuhai showCoach Outlet in 2008," Fisher said referring to an annual China air show. He beCoach Outletlieves the new J-31 engine is undergoing preliminary
海阔天空 Homepage
2013-5-13 20:33
海阔天空俏佳人娱乐会所15026982229 小姐服务24小时出差旅游大学生兼职按摩小姐上门,处女开红,兼职空姐,,白俄罗斯小姐,兼职模特,性感少妇全国连锁,就近提供北京、上海、广州等地姐兼职美女上门保健按摩北京小姐上门,上海兼职美眉,广州美女上门保健按摩,西安女大学生兼职,重庆空姐兼职,杭州酒店宾馆美女,温州兼职美女,南京白领兼职,全国本地找小姐上门按摩,模特私拍,援助交际更多请进 www.lvcai.org 查看
分页: 3/4 第一页 上页 1 2 3 4 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]