rsync安装使用
安装
yum install rsync mkdir /etc/rsyncd cd /etc/rsyncd vi rsyncd.conf
pid file = /var/run/rsyncd.pid
uid = root
gid = root use chroot = no
read only = yes #limit access to private LANs
hosts allow=192.168.1.2/32,127.0.0.1/32
hosts deny=* max connections = 5
motd file = /etc/rsyncd/rsyncd.motd #This will give you a separate log file
log file = /var/log/rsync.log #This will log every file transferred - up to 85,000+ per user, per sync
transfer logging = yes log format = %t %a %m %f %b
syslog facility = local3
timeout = 300 [ftp_home]
path = /ftp_data/ftp_dir
list=yes
ignore errors
auth users = ftpuser
#secrets file = /etc/rsyncd/rsyncd.secrets
comment = This is test data
启动服务
/usr/bin/rsync --daemon --config=/etc/rsyncd/rsyncd.conf
关闭服务
kill `cat /var/run/rsyncd.pid`
查看服务
tail /var/log/rsync.log
ps aux|grep rsync
netstat -apn|grep 873
加入开机启动
echo "/usr/bin/rsync --daemon --config=/etc/rsyncd/rsyncd.conf" >> /etc/rc.local
同步数据
rsync --list-only ftpuser@127.0.0.1::ftp_home rsync -ave ssh root@127.0.0.1:/ftp_data/test1 .
注意server密码文件是"用户名:密码",客户端那边只用"密码"。两边都需要chmod 600 rsyncd.secrets
rsync -rtvzPL --include-from=rsync_include.lst --password-file=/etc/rsyncd.secrets /source_rsync/ gameserverlog@192.168.0.1::game_server_log_rsync vi rsync_include.lst
+ itemdata*.txt
+ data*.txt
- *
查看服务器列表
rsync --list-only --password-file=rsyncd.secrets gameserverlog@192.168.0.1::gmweb_log_rsync
服务器配置文件
vi /etc/rsyncd.conf
[gmweb_log_rsync]
comment = public archive
path = /data/log/test1_vn
lock file = /var/lock/log_rsyncd
read only = no
list = yes
uid = jslog
gid = jslog
auth users =gameserverlog
secrets file = /etc/rsyncd.secrets
hosts allow=192.168.1.1
hosts deny =*
timeout =
refuse options = checksum dry-run
rsync安装使用的更多相关文章
- Rsync安装部署
Rsync安装部署 1.Rsync 简介 Rsync 是一款开源的.快速的 多功能的 可以实现全量以及增量的本地或者是远程的数据同步备份的优秀工具,并且可以不进行改变原有的数据属性信息,实现数据的 ...
- rsync安装配置及故障解决完全教程[window, 文件同步]
Rsync是的全称是: remote synchronize, 也就是远程同步数据, 它是一款不错的文件同步软件,而且是免费的, 它在镜像保存整个目录树和文件系统的同时保持原来文件的权限.时间.软硬链 ...
- rsync安装及配置
一.Server端 CentOS 6下安装yum -y install xinetd1.配置:vi /etc/xinetd.d/rsyncservice rsync{ disable = yes ...
- rsync 安装与配置
1.什么是rsync Rsync(remote synchronize)是一个远程数据同步工具,可通过LAN/WAN快速同步多台主机间的文件.Rsync使用所谓的“Rsync算法”来使本地和远 程两个 ...
- centos rsync安装配置
安装 1 yum -y install rsync ---------------------服务器安装------------------------------- 创建基础配置文件 1 2 3 4 ...
- puppet aix package 之rsync安装
AIX中使用RPM安装RSync遇到的问题及解决办法 最近在折腾AIX的系统,它里面本来有一个包管理工具叫installp,但是俺不会用,也不知道从那里找包. 幸亏AIX提供了RPM的支持,所以安装软 ...
- rsync 安装使用详解
rsync是类unix系统下的数据镜像备份工具,从软件的命名上就可以看出来了——remote sync.它的特性如下:可以镜像保存整个目录树和文件系统.可以很容易做到保持原来文件的权限.时间.软硬链接 ...
- rsync安装及其配置
服务端配置安装 服务器 第一步: 下载rsync 安装包(在线安装或者线下安装) wget https://download.samba.org/pub/rsync/rsync-3.1 ...
- inotify+rsync安装配置
环境 系统 IP地址 主服务器 CentOS7.4 192.168.1.1 备份服务器 CentOS7.4 192.168.1.2 一.备份服务器 安装rsync(备) wget https://rs ...
随机推荐
- requestscope.contextpath和<%=request.getContextPath()%>有何区别?(待解答)
问题1:requestscope.contextpath和<%=request.getContextPath()%>有何区别? 问题2:${requestscope.contextpath ...
- JS URL 使用base64加密与解密
JS编码方式: <script type="text/javascript"> document.write(encodeURI("http://www.w3 ...
- java学习笔记(三)字符串
字符串String 创建方法: 一·通过new创建 String str1= new String("abc"); 二 直接创建 String str2="abc ...
- (VS) TFS lost mapping suddenly.
家里的网络不是很稳定.今天突然发现 TFS 上所有的 mapping都突然没有了. 尝试去remapping,在Source Control Explorer 中右击源文件,然后选择 Advanced ...
- [jQuery]《锋利的jQuery》插件部分总结
/** * <锋利的jQuery>插件部分总结 * * jQuery插件推荐命名:jquery.name.js * * $.fn.extend用于封装对象方法的插件 * $.extend用 ...
- AP_HZ Party和Supplier、Bank表关系详解
2014-06-26 Created By BaoXinjian
- DBA_FND Load程式迁移工具介绍和应用(案例)
2014-06-10 Created By BaoXinjian
- hdu 5363 组合数学 快速幂
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Problem Descrip ...
- js实现的新闻列表垂直滚动实现详解
js实现的新闻列表垂直滚动实现详解:新闻列表垂直滚动效果在大量的网站都有应用,有点自然是不言而喻的,首先由于网页的空间有限,使用滚动代码可以使用最小的空间提供更多的信息量,还有让网页有了动态的效果,更 ...
- 2015 年最棒的 5 个 HTML5 框架
大多数的 web 开发者一直在用关键点来寻找动态的框架,这样能简化他们的设计和开发工作.HTML5 框架在所有的 web 浏览器和手机应用上都展现了优秀的性能.它不仅简化了 HTML5 开发中 CSS ...