rsync同步遇到的报错和解决办法

 

科技小能手 2017-11-12 18:27:00 浏览1125

 

在同步的客户端操作:

[root@www1 dbbackup]# /usr/bin/rsync  -avzP  --password-file=/tmp/passwd.txt  zytbuser@192.168.10.11::dbdata /data/backup/6.100.25.07/dbbackup

rsync: read error: Connection reset by peer (104)

rsync error: error in rsync protocol data stream (code 12) at io.c(759) [receiver=3.0.6]

解决方法:

在rsyncd.conf的服务端操作:

xnetid启动

rsync: read error: Connection reset by peer (104)

rsync error: error in rsync protocol data stream (code 12) at io.c(759) [receiver=3.0.5]

查看rsync日志

rsync: unable to open configuration file "/etc/rsyncd.conf": No such file or directory

xnetid查找的配置文件位置默认是/etc下,根据具体情况创建软链接。例如:

ln -s /etc/rsyncd/rsyncd.conf /etc/rsyncd.conf

或者更改指定默认的配置文件路径,在/etc/xinetd.d/rsync配置文件中。

[root@localhost rsyncd]# ln -s /etc/rsyncd/rsyncd.conf /etc/rsyncd.conf

[root@localhost rsyncd]# ll /etc/rsyncd.conf

lrwxrwxrwx 1 root root 23 8月   1 13:25 /etc/rsyncd.conf -> /etc/rsyncd/rsyncd.conf

rsync权限问题:

[root@localhost 20170807]# /usr/bin/rsync -avH --port=873 --progress ppwxtbuser@192.168.10.98::ppwxweb /data/backup/14.203.190.21 --password-file=/tmp/passwdwx.txt

receiving incremental file list

rsync: send_files failed to open "root" (in ppwxweb): Permission denied (13)

sent 83 bytes  received 480 bytes  1126.00 bytes/sec

total size is 88142423  speedup is 156558.48

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1505) [generator=3.0.6]

一开始权限是:www.www 现在修改为root,从此不再报错:

[root@localhost backup]# egrep "uid|gid|read" /etc/rsyncd.conf

uid = root

gid = root

read only = no

rsync同步报错:

[root@localhost 104.203.190.21]# /usr/bin/rsync -avH --port=873 --progress ppwxtbuser@192.168.10.98::ppwxdb /data/backup/14.203.190.21/dbbackup --password-file=/tmp/passwdwx.txt

@ERROR: chdir failed

rsync error: error starting client-server protocol (code 5) at main.c(1503) [receiver=3.0.6]

原因是:

[root@localhost dbackup]# grep pat /etc/rsyncd.conf|tail -1

path = /data/backup/dbackup

/data/backup/dbackup 写成了/data/backup/dbbackup

 

rsync同步遇到的报错和解决办法的更多相关文章

  1. Springboot数据库连接池报错的解决办法

    Springboot数据库连接池报错的解决办法 这个异常通常在Linux服务器上会发生,原因是Linux系统会主动断开一个长时间没有通信的连接 那么我们的问题就是:数据库连接池长时间处于间歇状态,导致 ...

  2. Loadrunner参数化连接oracle、mysql数据源报错及解决办法

    Loadrunner参数化连接oracle.mysql数据源报错及解决办法 (本人系统是Win7 64,  两位小伙伴因为是默认安装lr,安装在 最终参数化的时候,出现连接字符串无法自动加载出来: 最 ...

  3. PHP empty函数报错的解决办法

    PHP empty函数在检测一个非变量情况下报错的解决办法. PHP开发时,当你使用empty检查一个函数返回的结果时会报错:Fatal error: Can't use function retur ...

  4. eclipse中的js文件报错的解决办法

    在使用别人的项目的时候,导入到eclipse中发现js文件报错,解决办法是关闭eclipse的js校验功能. 三个步骤: 1. 右键点击项目->properties->Validation ...

  5. Base64 报错 的解决办法 (Base-64 字符数组或字符串的长度无效。, 输入的不是有效的 Base-64 字符串,因为它包含非 Base-64 字符、两个以上的填充字符,或者填充字符间包含非法字符。)

    Base64 报错 的解决办法, 报错如下:1. FormatException: The input is not a valid Base-64 string as it contains a n ...

  6. VM装mac10.9教程+报错信息解决办法

    VM装mac10.9教程+报错信息解决办法 教程1: 教你在Vmware 10下安装苹果Mac10.9系统 地址:http://tieba.baidu.com/p/2847457021 教程2: VM ...

  7. Oracle数据库误删文件导致rman备份报错RMAN-06169解决办法

    Oracle数据库误删文件导致rman备份报错RMAN-06169解决办法 可能是误删文件导致在使用rman备份时候出现以下提示 RMAN-06169: could not read file hea ...

  8. Xamarin开发安装Visual Studio 2015 update2报错的解决办法

    Xamarin开发安装Visual Studio 2015 update2报错的解决办法错误信息:update 2 requires a member of the visual studio 201 ...

  9. Linux虚拟机--进入MySQL报错的解决办法

    在Linux安装MySQL有时候会出现 [mysql]ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/ ...

随机推荐

  1. rpm 命令介绍

    1. rpm 命令常用选项说明 1.1 功能模式选项 命令 解释 -i --install 安装软件,例:rpm -ivh tree-1.6.0-10.el7.x86_64.rpm -U --upgr ...

  2. 用RUST写流媒体服务器实战——rtmp chunk 深入解析

    用RUST写流媒体服务器实战--rtmp chunk 深入解析 最近几个月断更了,把精力放在了新的开源项目上,一个用rust写的流媒体服务xiu. 实现过程中踩了不少坑,今天说下rtmp中的chunk ...

  3. Ambassador-04- Mapping 资源

    官方文档:https://www.getambassador.io/docs/latest/topics/using/intro-mappings/#resources Ambassador 通过Ma ...

  4. matlab map容器类型

    matlab map容器类型 map容器类型以及map类概述 map是将一个量映射到另一个量上,此是前面的量就是map的键(key),后面的量就是map的数据(value).map的键和对应的数据都储 ...

  5. D - The Frog's Games (二分)

    The annual Games in frogs' kingdom started again. The most famous game is the Ironfrog Triathlon. On ...

  6. ASP去除所有html标签

    ASP去除所有html标签 function nohtml(str) dim re Set re=new RegExp re.IgnoreCase =true re.Global=True re.Pa ...

  7. php文件的自动加载

    <?php spl_autoload_register(function ($class_name) { require_once $class_name . '.php'; });

  8. 深入学习Android系统上mount命令的使用

    博客链接:http://blog.csdn.net/qq1084283172/article/details/52493227 在Android系统的预装apk病毒和elf病毒的清除时,经常需要先获取 ...

  9. Weblogic SSRF漏洞(CVE-2014-4210)

    Weblogic中存在一个SSRF漏洞,利用该漏洞可以发送任意HTTP请求,进而攻击内网中redis.fastcgi等脆弱组件. 关于SSRF漏洞我们就不讲了,传送门--> SSRF(服务端请求 ...

  10. 【opencv】Java实现的opencv3.x版本后Highhui报错

    随笔为博主原创,如需转载,请注明出处. opencv3.x以后Highgui不再使用,用Imgcodecs代替,引入import org.opencv.imgcodecs.Imgcodecs;即可. ...