美文网首页
报错总结 rsync推送问题

报错总结 rsync推送问题

作者: 马帅琦 | 来源:发表于2019-04-19 16:31 被阅读0次

    报错原因:客户端推送/data到服务端
    客户端显示正常
    服务端/backup下空的

    客户端发送
    [root@nfs01 /data]# rsync -avz /data rsync_backup@172.16.1.41::backup
    sending incremental file list
    data/
    data/1.txt
    data/10.txt
    data/2.txt
    data/3.txt
    data/4.txt
    data/5.txt
    data/6.txt
    data/7.txt
    data/8.txt
    data/9.txt
    
    sent 610 bytes  received 218 bytes  1,656.00 bytes/sec
    total size is 0  speedup is 0.00
    服务端接受
    root@backup ~]# ls /backup/
    空的
    服务端各种配置没毛病
    [root@backup /backup]# ls -ld /backup/
    drwxr-xr-x 4 rsync rsync 50 4月  19 16:21 /backup/
    [root@backup /backup]# cat /etc/rsyncd.conf
    #rsync_config_______________start
    #created by oldboy
    #site: http://www.oldboyedu.com
    uid = rsync
    gid = rsync
    use chroot = no
    fake super = yes
    max connections = 200
    timeout = 600 
    pid file = /var/run/rsyncd.pid
    lock file = /var/run/rsync.lock
    log file = /var/log/rsyncd.log
    ignore errors
    read only = false
    list = false
    hosts allow = 172.16.1.0/24
    hosts deny = 0.0.0.0/32
    auth users = rsync_backup
    secrets file = /etc/rsync.password
    [backup]
    comment = welcome to oldboyedu backup!
    path = /backup/
    [oldboy]
    path = /oldboy/
    [root@backup /backup]#  cat /etc/rsync.password
    rsync_backup:oldboy
    [root@backup /backup]#  ls -l /etc/rsync.password
    -rw------- 1 root root 20 4月  15 16:20 /etc/rsync.password
    客户端也没毛病
    [root@nfs01 ~]# cat /etc/rsync.password 
    oldboy
    [root@nfs01 ~]# ls -l /etc/rsync.password 
    -rw------- 1 root root 7 4月  15 11:56 /etc/rsync.password
    [root@nfs01 ~]# tail -2 /etc/bashrc
    # vim:ts=4:sw=4
     export RSYNC_PASSWORD=oldboy
    
    俺也不知道为啥
    传过去是空的
    解决方法
    删除服务端/backup目录
    rm -rf /backup
    重新创建/backup
    mkdir -p /backup
    授权
    chown rsync.rsync /backup
    俺也不知道为啥然后在客户端推送就能通
    
    

    相关文章

      网友评论

          本文标题:报错总结 rsync推送问题

          本文链接:https://www.haomeiwen.com/subject/fkhcgqtx.html