首页 > 代码库 > rsync 模块同步失败
rsync 模块同步失败
Rsync同步失败困扰了好几天,上网找资料还是无济于事,头疼,就在今天早上,我意外的解决了,原来是这里的问题,被细节打败,详细信息如下:
[root@Shell ~]# rsync -avzP /backup/ rsync_backup@192.168.1.202::backup/ --password-file=/etc/rsync.password
@ERROR: auth failed on module backup
rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]
这个是我的报错信息,baidu google 都说是 password 不一样 或者格式不对造成的,可我检测并没有哦发现问题,就这样一次的测试,后来又死机 iptables 就出问题,最后直接关闭,测试依然报错,检测backup server 配置文件
[root@Nagios ~]# cat /etc/rsyncd.conf
#Rsync server
#created by qyt 20150708
#rsyncd.conf start#
uid = rsync
gid = rsync
user chroot = no
max connections = 2000
timeout = 600
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
[backup]
path = /backup/
ignore errors
read only = false
list = false
hosts allow = 192.168.1.0/24
hosts deny = 0.0.0.0/32
auth users = rsync_backup
secrets file = /etc/rsync.password ###密码文件
#rsync_config______end
没有问题啊,无意间发现###密码文件 的位置,删除后解除。
[root@Shell ~]# rsync -avzP /backup/ rsync_backup@192.168.1.202::backup/ --password-file=/etc/rsync.password
sending incremental file list
./
test.txt
0 100% 0.00kB/s 0:00:00 (xfer#1, to-check=0/2)
sent 78 bytes received 30 bytes 72.00 bytes/sec
total size is 0 speedup is 0.00
细节注定一切,写这个就是给自己的警醒。
本文出自 “实用笔记” 博客,请务必保留此出处http://qiuyt.blog.51cto.com/1229789/1531129