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 通过密码文件实现远程同步的更多相关文章

  1. 利用Inotify和Rsync将webproject文件自己主动同步到多台应用server

    背景:须要搭建一套跟线上一模一样的环境,用来预公布,这是当中的web分发的一个小模块的实现过程. 1 工具以及环境简单介绍 1.1,Inotify工具 Inotify,它是一个内核用于通知用户空间程序 ...

  2. rsync + inotify-tools实现文件的实时同步

    文章摘自:http://lxw66.blog.51cto.com/5547576/1331048 rsync 帮助文档:http://man.linuxde.net/rsync 最近有个想法就是部署一 ...

  3. [转]CENTOS 使用RSYNC+INOTIFY实现文件实时自动同步

    FROM : http://www.qiansw.com/centos-rsync-inotify-file-sync.html 生产环境中的两台web服务器,有个目录需要完全一样.使用rsync和i ...

  4. nfs+rsync+inotify实现文件的实时同步

    准备三台服务器进行测试: nfs_server:192.168.12.110 web_server:192.168.12.111 rsync_server:192.168.12.112 网络规划图: ...

  5. CentOS6.5使用rsync远程同步

    需达成目标:在服务器(192.168.18.211)端搭建 rsync 服务,       将 /root/rsync-server/ 目录同步到客户端 /root/rsync-local 目录 Li ...

  6. Centos 6.5配置rsync+inotify实现文件实时同步

    1.安装rsync(两台机器执行相同的步骤)yum install gcc yum install rsyncd xinetd -y因为rsync是由xinetd启动的,所以需要修改一个配置vim / ...

  7. Linux rsync 远程同步部署篇

    rsync官网: www.samba.org/ftp/rsync.html端口:873上机实战系列项目100台规模集群全网数据备份解决方案3.本项目提供免费实战讲解视频:Linux集群全网服务器数据备 ...

  8. 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 ...

  9. linux下ssh远程登录/scp远程复制文件/rsync远程同步命令的自动登录

    最近需要写一个脚本备份各个服务器上的程序到一个指定服务器上,本来以为查查rsync命令的使用321就能搞定,结果rsync命令要支持自动登 录还是要配置服务和参数,又不确定网上说的配置的行不行,因为都 ...

随机推荐

  1. zabbix监控路由器

    在路由器上添加团体名: snmp-server enable traps snmp-server community XXXX rw   1.使用Getif查看路由器端口信息 getif-2.31

  2. 20145326 《Java程序设计》第9周学习总结

    20145326 <Java程序设计>第9周学习总结 教材学习内容总结 第十六章 一.JDBC入门 1.JDBC简介 JDBC是用于执行SQL的解决方案,开发人员使用JDBC的标准接口,数 ...

  3. 《EMCAScript6入门》读书笔记——14.Promise对象

  4. HDU 4183 Pahom on Water(最大流)

    https://vjudge.net/problem/HDU-4183 题意: 这道题目的英文实在是很难理解啊. 给出n个圆,每个圆有频率,x.y轴和半径r4个属性,每次将频率为400的圆作为起点,频 ...

  5. Codeforces Round #402 (Div. 2) A,B,C,D,E

    A. Pupils Redistribution time limit per test 1 second memory limit per test 256 megabytes input stan ...

  6. [原][译][osgearth]API加载地球(OE官方文档翻译)

    原文参考:http://docs.osgearth.org/en/latest/developer/maps.html#programmatic-map-creation 本人翻译水平有限... 加载 ...

  7. 【Mysql】修改mysql的字符集和默认存储引擎,解决数据入库乱码问题

    背景 在使用Python + Testlink做自动化的过程中,遇到了数据入库出现乱码的情况,后来通过修改字符集的方式解决了这个问题.下面的内容主要来自于一篇相关博文,博主做了细微的调整, 原文链接: ...

  8. Idea使用(摘抄至java后端技术公众号-孤独烟)

    1. idea自动编译需要手动开启: 2. 手动去掉idea自动提示时候不区分字母大小写 3. idea自动导入包 4. 悬浮开关提示:鼠标放上去就给出提示 5. 打开的所有类tabs换行显示,不单行 ...

  9. Learn Rails5.2 Routes。( 很少用到的参数:constraints和redirect)

    Naming a Route get 'home/index', as: "different_name" 会得到prefix: different_name代替home_inde ...

  10. 本地Run Page时报检测到意外的 URL 参数,它将被忽略。

    经查,是因为我RUN的时候 Target URL -- http://MY-PC:8988/OA_HTML/runregion.jsp 将MY-PC更改为本地IP即可. 设置方法 Tools - Em ...