http://rsync.samba.org/download.html
[root@v01 src]# yum install git
[root@v01 src]# git clone git://git.samba.org/rsync.git
[root@v01 src]# git clone git://git.samba.org/rsync.git
Initialized empty Git repository in /usr/local/src/rsync/.git/
remote: Counting objects: 25470, done.
remote: Compressing objects: 100% (9736/9736), done.
[root@v01 local]# which rsync
/usr/bin/rsync
[root@v01 local]# rpm -qf /usr/bin/rsync
rsync-3.0.6-12.el6.x86_64
[root@v01 www]# rsync -a webtest/ online/
[root@v01 www]# tree online/
online/
├── authz
├── index.html
└── index.php 0 directories, 3 files
[root@v01 www]# cd online/
[root@v01 online]# ll -all
total 24
drwxr-xr-x. 3 www www 4096 May 9 12:03 .
dr-xr-xr-x. 6 www www 4096 May 9 12:42 ..
-rw-r--r--. 1 root root 1080 May 9 12:03 authz
-rw-r--r--. 1 root root 31 May 9 11:40 index.html
-rw-r--r--. 1 root root 17 May 9 10:42 index.php
drwxr-xr-x. 6 root root 4096 May 9 12:03 .svn
[root@v01 www]# rsync -v webtest/* online/ #如果加*(如:webtest/*),则.xxx的隐藏文件不会被同步
authz
index.html
index.php sent 1315 bytes received 69 bytes 2768.00 bytes/sec
total size is 1128 speedup is 0.82
[root@v01 www]# cd online/
[root@v01 online]# ls
authz index.html index.php
[root@v01 online]# ll -all
total 20
drwxr-xr-x. 2 root root 4096 May 9 12:51 .
dr-xr-xr-x. 6 www www 4096 May 9 12:50 ..
-rw-r--r--. 1 root root 1080 May 9 12:51 authz
-rw-r--r--. 1 root root 31 May 9 12:51 index.html
-rw-r--r--. 1 root root 17 May 9 12:51 index.php

rsync实时同步文件的更多相关文章

  1. linux下实现多台服务器同步文件(inotify-tools+rsync实时同步文件安装和配置)

    inotify-tools+rsync实时同步文件安装和配置 注:转载https://www.linuxidc.com/Linux/2012-06/63624.htm

  2. inotify-tools+rsync实时同步文件安装和配置

    服务器A:论坛的主服务器,运行DZ X2论坛程序;服务器B:论坛从服务器,需要把X2的图片附件和MySQL数据实时从A主服务器实时同步到B服务器.MySQL同步设置会在下一编中说到.以下是用于实时同步 ...

  3. rsync+inotify安装配置 实时同步文件

    安装 #安装inotify 工具 [root@localhost ~]# yum install inotify-tools -y 常用命令 [root@localhost ~]# inotifywa ...

  4. linux设置rsync+inotify实时同步文件

    linux设置rsync+inotify实时同步文件   应用场景: 同步接收方:test01 接收目录:/opt/software/test/a/ 同步发起方:test02 同步目录:/opt/so ...

  5. 真正的inotify+rsync实时同步 彻底告别同步慢

    真正的inotify+rsync实时同步 彻底告别同步慢       http://www.ttlsa.com/web/let-infotify-rsync-fast/     背景 我们公司在用in ...

  6. sersync 实时同步文件

    sersync 主要用于服务器同步,web镜像等功能.sersync是使用c++编写,在结合rsync同步的时候,节省了运行时耗和网络资源.因此更快.sersync配置起来很简单.另外本项目相比较其他 ...

  7. CentOS7之Rsync+Inotify架构实现实时同步文件和文件夹

    简介:rsync是用来同步文件和文件夹的,inotify是用来实现监听变动而自动同步的 OS:Centos7.3 服务器端:172.16.13.157 客 户 端  :172.16.13.156 目  ...

  8. linux rsync实时同步

    rsync同步 同步与复制的差异:复制:完全拷贝源到目标同步:增量拷贝,只传输变化过的数据 同步操作:remote sync 远程同步支持本地复制,或与其他ssh,rsync主机同步.官方网站:htt ...

  9. lsyncd —— 多机器实时同步文件神器

    lsyncd 是一个支持实时.双向.多机器的多模式文件同步工具. 使用 Lua 语言封装了 inotify 和 rsync 工具,采用了 Linux 内核(2.6.13 及以后)里的 inotify ...

随机推荐

  1. zoj3819Average Score

    Average Score Time Limit: 2 Seconds      Memory Limit: 65536 KB Bob is a freshman in Marjar Universi ...

  2. Redis 下载

    https://github.com/MSOpenTech/redis/releases下载 Redis伴侣Redis Desktop Manager:http://redisdesktop.com/ ...

  3. js中网页图片自动更换的效果

    <script> var arr=new Array(); arr[]="url(images/city.jpg)"; arr[]="url(images/d ...

  4. ASP.NET MVC 数据分页

    作为一个菜鸟级的程序猿,总结一下学到的两种数据分页. 1.真分页 真分页就是需要时从数据库里读出需要多的数据,利用存储过程可实现.网上的分页SQL特别多,数据库自带的一些方法也可方便的帮助分页,但是我 ...

  5. c#之Redis实践list,hashtable

    写在前面 最近公司搞了一个活动,用到了redis的队列,就研究了下redis的相关内容.也顺手做了个demo. C#之使用Redis 可以通过Nuget安装Reidis的相关程序集.安装之后发现会引入 ...

  6. C++中析构函数的作用,

    如果构造函数打开了一个文件,最后不需要使用时文件就要被关闭.析构函数允许类自动完成类似清理工作,不必调用其他成员函数.析构函数也是特殊的类成员函数.简单来说,析构函数与构造函数的作用正好相反,它用来完 ...

  7. [整理]SSRS error:rsReportNotReady

    直接访问http://XXX/ReportServer/Pages/ReportViewer.aspx?reportpath&rs%3aCommand=Render执行查询是没有问题的. 但是 ...

  8. 搜狗2013年校园招聘研发类笔试试卷之C/C++类

    今天无聊在网上搜了下今年各大NB IT公司的笔试题,搜到了搜狗的,只有扫描版的试卷没有电子版也没有答案,就拿来做了做,题目非常多,涉及到C/C++.Java.数据结构.Android.IOS.Java ...

  9. POJ 1836 Alignment

    Alignment Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 11450 Accepted: 3647 Descriptio ...

  10. [BZOJ2959]长跑——新技能:LCT+缩圈

    [BZOJ2959]长跑 试题描述 某校开展了同学们喜闻乐见的阳光长跑活动.为了能“为祖国健康工作五十年”,同学们纷纷离开寝室,离开教室,离开实验室,到操场参加3000米长跑运动.一时间操场上熙熙攘攘 ...