[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 ...
随机推荐
- 372. Delete Node in a Linked List【LintCode java】
Description Implement an algorithm to delete a node in the middle of a singly linked list, given onl ...
- 【setUp-tearDown】线程组开始,结束各执行一次
使用setUp线程组的方式 ——> 开始 使用tearDown线程组 的方式 ——>结束
- HTMLTestRunner带饼图
# -*- coding: utf-8 -*- """ A TestRunner for use with the Python unit testing framewo ...
- Quartz定时器原理与使用
Quartz是OpenSymphony开源组织在Job scheduling领域又一个开源项目,是一个完全由java编写的开源作业调度框架. Quartz可以用来创建简单或为运行十个,百个,甚至是好几 ...
- 【Python 开发】第三篇:python 实用小工具
一.快速启动一个web下载服务器 官方文档:https://docs.python.org/2/library/simplehttpserver.html 1)web服务器:使用SimpleHTTPS ...
- Matlab带比较方法的快排
首先是主方法QUCIKSORT:(从小到大排列) function [A]=QUICKSORT(A,Low,high,mdat) set(,) if Low<high [A,w]=SPLITIO ...
- parity注记词和地址
remix skilled curled cobweb tactics koala bartender precinct energize exes ridden cohesive 0x00EeC52 ...
- Python3 Tkinter-Place
1.绝对坐标 from tkinter import * root=Tk() lb=Label(root,text='hello Place') lb.place(x=0,y=0,anchor=NW) ...
- Alpha发布——Thunder团队
视频展示 视频链接: 爱奇艺: http://www.iqiyi.com/w_19ruzwru25.html (画质清晰,但可能需多次刷新或重新打开页面,此问题因电脑型号和网络而异) 优酷: ...
- JavaScript初探系列之String的基本操作
1.字符串转换 字符串转换是最基础的要求和工作,你可以将任何类型的数据都转换为字符串,你可以用下面三种方法的任何一种: var myStr = num.toString(); // "19& ...