[rsync]rsync设定及错误处理
- server端设置
修改/etc/default/rsync
RSYNC_ENABLE=true
RSYNC_OPTS='--address=10.192.0.5'
RSYNC_NICE=''
- 修改/etc/rsyncd.conf
# sample rsyncd.conf configuration file
# GLOBAL OPTIONS
#motd file=/etc/motd
uid = nobody
gid = nogroup
use chroot = no
max connections = 10
strict modes = yes
log file=/var/log/rsyncd.log
# for pid file, do not use /var/run/rsync.pid if
# you are going to run rsync out of the init.d script.
# pid file=/var/run/rsyncd.pid
#syslog facility=daemon
#socket options=
# MODULE OPTIONS
[cashare]
comment = CA-Share
path = /home/cashare
uid = root
gid = root
read only = yes
hosts allow = 10.192.0.0/24
list = false
ignore erros
auth users = backup
secrets file = /etc/rsync.pass
transfer logging = yes
log format = %t: host %h (%a) %o %f (%l bytes). Total %b bytes.
基本上配置还是比较好理解的了。
创建/etc/rsync.pass
chmod 600 /etc/rsync.pass
echo ‘backup:backup’ > /etc/rsync.pass
- 客户端配置:
命令格式:
/usr/bin/rsync -vzrtopg --delete --progress backup@10.192.0.5::cashare /backup-10.192.0.5 --password-file=/etc/rsync.pass
写入到crontab
cat /etc/rsync.pass
backup
- 犯得错误:
rsync: failed to connect to 192.168.1.106: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.6]
应该和下面原因相同
root@InnerServer3:/etc# rsync -vzrtopg --delete --progress gitlab@10.192.0.5:gitlab /backup-10.192.0.5/
gitlab@10.192.0.5's password:
Permission denied, please try again
ip之后应该是::而不是:,疏忽啊
@ERROR: auth failed on module gitlab
rsync error: error starting client-server protocol (code 5) at main.c(1534) [Receiver=3.0.8]
在client的密码文件中,只保存密码。
[rsync]rsync设定及错误处理的更多相关文章
- Linux-非结构化数据同步-Linux下Rsync+Rsync实现非结构化增量差异数据的同步2
说明: 操作系统:CentOS 5.X 源服务器:192.168.21.129 目标服务器:192.168.21.127,192.168.21.128 目的:把源服务器上/home/www.osyun ...
- [rsync]——rsync文件同步和备份
实验环境 (1) Rsync服务器:10.0.10.158 (2) Rsync客户端:10.0.10.173 Rsync服务器端的配置 1. 安装xinetd和rsync # yum install ...
- [daily][archlinux][rsync] rsync
科普文档:https://wiki.archlinux.org/index.php/Rsync 之前改文件系统时,用过. 然而用的不太对,导致一部分文件的权限出了问题. [troubleshoot][ ...
- centos linux 系统日常管理4 scp,rsync,md5sum,sha1sum,strace ,find Rsync 常见错误及解决方法 第十七节课
centos linux 系统日常管理4 scp,rsync,md5sum,sha1sum,strace ,find Rsync 常见错误及解决方法 第十七节课 rsync可以增量同步,scp不行 ...
- Linux下rsync daemon模式下的错误汇总
一.前言:最近学习服务环境搭建,遇到了许多大大小小的问题,不过还好,经过我的一通努力终于都解决了,所以分享出来给自己留个纪念,同时也希望能帮助学习中的朋友. 二.环境:两台服务器环境相同 1 [roo ...
- rsync常见错误
rsync使用时的常见问题: 错误1: rsync: read error: Connection reset by peer (104) rsync error: error in rsync pr ...
- rsync错误
rsync error:No route to host rsync服务端开启的iptables防火墙 [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_ba ...
- 【集群实战】Rsync常见错误总结
1. 服务端指定模块没有对应目录 报错详情: @ERROR: chdir failed rsync error: error startingclient-server protocol (code ...
- 配置rsync服务,数据同步。
这部分设计服务器端和客户端. [服务器端] 如果服务器没有安装rsync服务则使用yum安装rsync服务. yum install rsync 然后 vim /etc/xinetd.d/rsync ...
随机推荐
- Spring Cloud(五):Hystrix 监控面板【Finchley 版】
Spring Cloud(五):Hystrix 监控面板[Finchley 版] 发表于 2018-04-16 | 更新于 2018-05-10 | 在上一篇 Hystrix 的介绍中,我们提到 ...
- python邮件服务-yagmail
下载安装 yagmail import yagmail #链接邮箱服务器 #此处的password是授权码 yag= yagmail.SMTP( user="843092012@qq.c ...
- HTML/JSP中一些单书名号标签的用途<%-- --%><!-- --><%@ %><%! %><% %><%= %>
注释 <%-- --%>是(JSP)隐式注释,不会在页面显示的注释 <!-- -->是(Html)显示注释,会在JSP页面显示 关于注释还有单行隐式注释//和多行隐式注释/* ...
- 莱布尼兹三角形(C++)
[问题描述] 如下图所示的三角形,请编程输出图中排在第 n 行从左边数第 m 个位置上的数. [代码展示] # include<iostream># include<cstdio&g ...
- UVa 1583 - Digit Generator 解题报告 - C语言
1.题目大意 如果a加上a的各个数字之和得到b,则说a是b的生成元.给出n其中$1\le n\le 100000$,求其最小生成元,若没有解则输出0. 2.思路 使用打表的方法打出各个数字a对应的b, ...
- Bitcoin: A Peer-to-Peer Electronic Cash System
Bitcoin: A Peer-to-Peer Electronic Cash System Satoshi Nakamoto October 31, 2008 Abstract A purely p ...
- URAL 1297 Palindrome(Manacher)
The “U.S. Robots” HQ has just received a rather alarming anonymous letter. It states that the agent ...
- Centos下的SVN搭建
需求: 搭建SVN实现本地开发环境,方便线上代码的更新. 步骤: 1. 安装SVN服务 yum install -y subversion 2.创建SVN代码库的目录.创建版本库 mkdir -p / ...
- 衡量生活成本:消费者价格指数(CPI, Consumer Price Index)
经济学家应该如何把经济中的许多价格加总成一个单一指数,从而能够衡量价格的总体水平呢?他们可以简单地计算所有产品与服务价格的平均值,但是这种方法的不足之处是把所有的产品与服务等同处理.由于人们购买的鸡比 ...
- 《剑指offer》---输出链表倒数第k个结点
本文算法使用python3实现 1 题目描述: 输入一个链表,输出该链表中倒数第k个结点. 时间限制:1s:空间限制:32768K 2 思路描述: 方法一:当链表长度为 $ n $ 时,输 ...