rsync 通过密码文件实现远程同步
https://my.oschina.net/yyping/blog/91964
1、源文件服务器:192.168.10.203
2、备份服务器:192.168.10.88
配置备份服务器(192.168.10.88)
vim /etc/rsync.conf
uid = www
gid = www
read only = no
hosts allow = *
[web]
path = /var/www
auth users = yyp
secrets file = /etc/rsyncd.secrets
vim /etc/rsyncd.secrets
yyp:123456
chmod 600 /etc/rsyncd.secrets
useradd yyp
echo "123456" | passwd yyp --stdin
mkdir /var/wwww
启动服务
rsync --daemon --config=/etc/rsyc.conf
配置源服务器
vim /etc/rsyncd.secrets
123456
chmod 600 /ec/rsyncd.secrets
mkdir /var/www
同步文件
rsync -avz --password-file=/etc/rsyncd.secret /var/www yyp@192.168.10.88::web
错误汇总:
rsync: recv_generator: mkdir "test" (in dest) failed: Permission denied (13)
*** Skipping everything below this failed directory ***
这个表明权限不正确解决办法三个:(1)把备份服务器/etc/rsync.conf gid和uid 修改为root; (2)把备份目录上的权限设置为777;(3)修改备份目录拥有者和所属组为/etc/rsync.conf配置文件中的gid和uid
rsync: read error: Connection reset by peer (104)rsync error: error in rsync protocol data stream (code 12) at io.c(614) [receiver=2.6.8]
通过日志/var/log/messages查看得到
rsync: unable to open configuration file "/etc/rsync.conf": No such file or directory (2)
做一个软连接上去:ln -s /etc/rsyncd.conf /etc/rsync.con
rsync 通过密码文件实现远程同步的更多相关文章
- 利用Inotify和Rsync将webproject文件自己主动同步到多台应用server
背景:须要搭建一套跟线上一模一样的环境,用来预公布,这是当中的web分发的一个小模块的实现过程. 1 工具以及环境简单介绍 1.1,Inotify工具 Inotify,它是一个内核用于通知用户空间程序 ...
- rsync + inotify-tools实现文件的实时同步
文章摘自:http://lxw66.blog.51cto.com/5547576/1331048 rsync 帮助文档:http://man.linuxde.net/rsync 最近有个想法就是部署一 ...
- [转]CENTOS 使用RSYNC+INOTIFY实现文件实时自动同步
FROM : http://www.qiansw.com/centos-rsync-inotify-file-sync.html 生产环境中的两台web服务器,有个目录需要完全一样.使用rsync和i ...
- nfs+rsync+inotify实现文件的实时同步
准备三台服务器进行测试: nfs_server:192.168.12.110 web_server:192.168.12.111 rsync_server:192.168.12.112 网络规划图: ...
- CentOS6.5使用rsync远程同步
需达成目标:在服务器(192.168.18.211)端搭建 rsync 服务, 将 /root/rsync-server/ 目录同步到客户端 /root/rsync-local 目录 Li ...
- Centos 6.5配置rsync+inotify实现文件实时同步
1.安装rsync(两台机器执行相同的步骤)yum install gcc yum install rsyncd xinetd -y因为rsync是由xinetd启动的,所以需要修改一个配置vim / ...
- Linux rsync 远程同步部署篇
rsync官网: www.samba.org/ftp/rsync.html端口:873上机实战系列项目100台规模集群全网数据备份解决方案3.本项目提供免费实战讲解视频:Linux集群全网服务器数据备 ...
- 12.2 中的Data Guard Standby 密码文件自动同步 (Doc ID 2307365.1)
Data Guard Standby Automatic Password file Synchronization in 12.2 (Doc ID 2307365.1) APPLIES TO: Or ...
- linux下ssh远程登录/scp远程复制文件/rsync远程同步命令的自动登录
最近需要写一个脚本备份各个服务器上的程序到一个指定服务器上,本来以为查查rsync命令的使用321就能搞定,结果rsync命令要支持自动登 录还是要配置服务和参数,又不确定网上说的配置的行不行,因为都 ...
随机推荐
- cookie的存取删
存: document.cookie = "name=Kevin;expires="+new Date().getDate()+7; //有效期7天 取: function Get ...
- 微信小程序:页面配置 page.json
微信小程序:页面配置 page.json 一.页面配置 page.json 如果整个小程序的风格是蓝色调,那么可以在 app.json 里边声明顶部颜色是蓝色即可. 实际情况可能不是这样,可能你小程序 ...
- mailx配置安装
mailxwget http://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5.orig.tar.gztar ...
- 20145330 《网络对抗》逆向及BOF基础实践
20145330 <网络对抗>逆向及BOF基础实践 1实践说明 本次实践的对象是一个名为pwn1的linux可执行文件. 该程序正常执行流程是:main调用foo函数,foo函数会简单回显 ...
- FMC简介
FMC简介 FMC ( FPGA Mezzanine Card ) 简而言之,是具有特定功能的子卡模块. Developed by a consortium of companies ranging ...
- Vim 的光标移动定位
一.光标移动以单个字符为单位: 在命令模式中 h向左 l 向右 j 向上 k 向下 二.光标移动以word 为单位: w 将光标向前移动一个word; b 将光标向后移动一个word: 以上2个命令光 ...
- How does flyway sort version numbers?
https://stackoverflow.com/questions/19984397/how-does-flyway-sort-version-numbers In one word: numer ...
- UVa 1664 Conquer a New Region(并查集)
https://vjudge.net/problem/UVA-1664 题意: n个城市形成一棵树,每条边有权值C(i,j).任意两个点的容量S(i,j)定义为i与j唯一通路上容量的最小值.找一个点, ...
- PHP中__autoload()与spl_autoload_register()函数的用法与区别
_autoload() 函数在PHP文档中的解释是试图使用尚未被定义的类时自动调用.通过调用此函数,脚本引擎在 PHP 出错失败前有了最后一个机会加载所需的类. 如何理解这句话,我们首先看下面一个简单 ...
- angular大牛的博客
对angular的了解比亲娘还了解,http://each.sinaapp.com/angular/index.html 对angular比较深入的研究,这个人的所有博客都值得一看,这是7. http ...