rsync 模块同步失败案例(auth failed on module backup)

2017年7月19日14:07:01 发表评论 2,841 views
广告也精彩

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

细节注定一切,写这个就是给自己的警醒。

  • QQ精品交流群
  • weinxin
  • 微信公众号
  • weinxin
广告也精彩
admin

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: