zoukankan      html  css  js  c++  java
  • rsync同步遇到的报错和解决办法

    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

     
  • 相关阅读:
    用powershell启动appfabric报错
    对引用和指针使用以及函数返回引用和指针类型的理解
    数组指针和数组引用做参数的区别(是否能够限定数组大小、数组降价)
    C++静态成员函数基本概念讲解
    函数中变量的生存期和作用域
    如何在Source Insight中配置Pc Lint
    iterator与const_iterator
    周数据转换为天数据的一个Sql数据查询
    如何提高结构对象作为键的哈希表的查找速度
    尽量用iterator代替const_iterator
  • 原文地址:https://www.cnblogs.com/xuanbjut/p/12631492.html
Copyright © 2011-2022 走看看