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 ...
随机推荐
- RegisterClientScriptBlock 与 RegisterStartupScript 的区别
RegisterClientScriptBlock.RegisterStartupScript 都是注册一个脚本块. ClientScript.RegisterClientScriptBlock(th ...
- java定时器和多线程实践记录
这几天因为需要测试mongodb读写分离的问题,因此写了个定时查询程序,并且用到了多线程,以达到定时启动多个线程查询数据库的效果,下边代码记录备忘: package timmer; import ja ...
- 黄聪:C#如何通过MeasureString、Graphics获取字符串的像素长度
1. 使用g.MeasureString()获得 使用MeasureString测量出来的字符宽度,总是比实际宽度大一些,而且随着字符的长度增大,貌似实际宽度和测量宽度的差距也越来越大了.查了一 ...
- room-views-用窗口颜色清除背景(Clear Background with Window Colour)选项
这个选项是默认开启的,它的作用是在游戏每一帧绘制以前,都用一个颜色打底(覆盖整个游戏场景包括背景,从而实现背景清除),然后在这个基础上再画背景.场景等等. 如果关闭,则在游戏每一帧以前绘制背景(绘制背 ...
- 简单数据访问类,生成简单SQL,自动转换成java对象
import java.util.HashMap; import java.util.List; import java.util.Map; import org.slf4j.Logger; impo ...
- fatal error C1853: '*.pch' is not a precompiled header file created with this compile
在菜单下选择Build--->点击Rebuild All,如果不起作用,你可以先把Debug或者Release中的文件删除,然后再试.
- springmvc 中RequestMapping注解的使用
1.RequestMapping注解既可以修饰方法,又可以修饰类型,类型指定的url相对于web跟路径,而方法修饰的url相对于类url: 2.RequestMapping的几个属性: value:用 ...
- CRM 2016 自定义lookup过滤
function preFilterLookup() { //终端业态 Xrm.Page.getControl("new_typeofoperationid").addPreSea ...
- spring listener引用spring中bean
在SSH项目开发中,会使用到监听器Listener,并且有时需要在监听器中完成数据库的操作等动作,此时需要在Listener中使用到Spring容器中的Bean.Spring容器本身就是在web.xm ...
- js替换字符串中全部“-”
alert("2014-03-22".replace('-','')); alert("2014-03-22".replace(/-/g,'')); 第一个运行 ...