rsync -avz /data/ rsync_backup@192.168.11.137::nfsbackup/
sending incremental file list
ERROR: module is read only
rsync error: syntax or usage error (code 1) at main.c(866) [receiver=3.0.6]
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at io.c(759) [sender=3.0.6]
错误出现的原因是:在服务器端的/etc/rsyncd.conf配置文件中新添加一个模块,导致客户端推送产生错误。
解决办法如下:(只要把服务端配置文件里目录和路径复制出来增加在下面就可以了(记得新建的目录要chown rsync.rsync授权一下),如果还要达到不同目录对应不同密码就要写在模块里,因为写在上面的为全局)
uid = rsync
gid = rsync
use chroot = no
max connections = 200
timeout = 300
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 = 192.168.11.0/24
hosts deny = 0.0.0.0/32
auth users =rsync_backup
secrets file = /etc/rsync.password
[backup]
path = /backup
[nfsbackup]
path=/nfsbackup
吃一堑长一智
本文出自 “11027252” 博客,请务必保留此出处http://11037252.blog.51cto.com/11027252/1980554
原文地址:http://11037252.blog.51cto.com/11027252/1980554