LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 822|回复: 2

rsync备份文件的问题

[复制链接]
发表于 2005-3-11 10:16:41 | 显示全部楼层 |阅读模式
配置如下:
[root@rh9 opt]# cat /etc/rsyncd.conf
uid = nobody
gid = nobody
use chroot = no
max connections = 4
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log

[apache]
path = /opt/apache
ignore errors
read only = true
list = false
#hosts allow = 202.99.11.121
#hosts deny = 0.0.0.0/32
auth users = backup
secrets file = /etc/user.pas


[root@rh9 opt]# cat /etc/user.pas
backup:backup

chmod 400 /etc/user.pas
chmod 400 /etc/rsyncd.conf

客户端执行错误:

[root@mail root]# rsync -vzrtopg --progress backup@192.168.0.223::apache /backup/apache/ --password-file=/etc/backup.pas
rsync: failed to connect to 192.168.0.223: Connection refused
rsync error: error in socket IO (code 10) at clientserver.c(97)
请问各位兄弟,这是什么问题造成的?

不过可以执行匿名备份文件,但是用户认证模式就会出现上面的问题。
 楼主| 发表于 2005-3-11 10:19:02 | 显示全部楼层
抱歉,这次是真正的rsync错误。
[root@mail root]# rsync -vzrtopg --progress backup@192.168.0.223::apache /backup/apache/ --password-file=/etc/user.pas  
@ERROR: auth failed on module apache
rsync: connection unexpectedly closed (90 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(150)
回复 支持 反对

使用道具 举报

发表于 2006-12-25 18:13:10 | 显示全部楼层
man里说,--password-file 只能用在local 本地拷贝
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表