免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 8848 | 回复: 18
打印 上一主题 下一主题

rsync同步备份急需解决办法 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-06-20 17:47 |只看该作者 |倒序浏览
10可用积分
uid = root       
gid = root
use chroot = no         
max connections = 4         
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log   

[backup]            
path = /home
comment = BACKUP CLIENT IS SOLARIS 8 E250
ignore errors            
read only = yes            
list = no            
auth users = root        
secrets file = /etc/rsyncd.pas   


[root@HBC ~]# cat /etc/rsyncd.pas
root:password

客户端
[root@hbc ~]# rsync -vzrtopg --progress --delete backup@192.168.1.55::backup
Password:
@ERROR: auth failed on module backup
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)


服务端的错误日志
nore errors
2008/06/20 18:26:48 [3483] name lookup failed for 192.168.1.56: Name or service not known
2008/06/20 18:26:50 [3483] auth failed on module backup from UNKNOWN (192.168.1.56)

请问高手如何解决~!!!着急~!!


按照楼下的帮助改变后
uid = root
gid = root
use chroot = no
max connections = 4
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
[root]
path = /home
comment = BACKUP CLIENT IS SOLARIS 8 E250
ignore errors
read only = yes
list = no
auth users = root
secrets file = /etc/rsyncd.pas

rsync -vzrtopg --progress --delete root@192.168.1.55::root  /root/path

客户端
@ERROR: auth failed on module root
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)


服务端日志

2008/06/23 09:38:03 [3130] secrets file must not be other-accessible (see strict modes option)
2008/06/23 09:38:03 [3130] continuing without secrets file
2008/06/23 09:38:03 [3130] auth failed on module root from UNKNOWN (192.168.1.56)


本人新手 谢谢大家指导,或者大家提供我一个简单的方法也行 谢谢了

[ 本帖最后由 1330313150 于 2008-6-23 09:25 编辑 ]

最佳答案

查看完整内容

配的乱七八糟的明明 auth users = root为什么要用 这样能验证成功才见鬼呢你到底是要用root用户还是用backup用户呀你准备把文件备份到哪里呢? 难道只写源地址不用目的地址的吗?兄弟, 你让我非常无语

论坛徽章:
0
2 [报告]
发表于 2008-06-20 17:47 |只看该作者
配的乱七八糟的
明明 auth users = root
为什么要用 backup@192.168.1.55 这样能验证成功才见鬼呢
你到底是要用root用户还是用backup用户呀

你准备把文件备份到哪里呢? 难道只写源地址不用目的地址的吗?

兄弟, 你让我非常无语

论坛徽章:
0
3 [报告]
发表于 2008-06-20 19:34 |只看该作者
auth failed on module backup from UNKNOWN
找不你定义的 backup 模块
[backup]            
path = /home
comment = BACKUP CLIENT IS SOLARIS 8 E250
ignore errors            
read only = yes            
list = no            
auth users = root        
secrets file = /etc/rsyncd.pas   
这部需要在客户端配置上,

你备到那里储存路径,没有路径
rsync -vzrtopg --progress --delete backup@192.168.1.55::backup
改为
rsync -vzrtopg --progress --delete backup@192.168.1.55::backup   /backup/path

论坛徽章:
0
4 [报告]
发表于 2008-06-20 19:39 |只看该作者
其实服务端不用配置的,如果你不是定时运行的,rsync.conf 者不用配置,
可以如下
rsync -vzrtopg --delete  -e ssh root@192.168.1.7:/home/test/ /home/backupl/
或者
rsync -vzrtopg --delete  -e ftp ftpuser@192.168.1.7:/home/test/ /home/backupl/

论坛徽章:
0
5 [报告]
发表于 2008-06-21 15:01 |只看该作者
学习一下,以后许能用上

论坛徽章:
0
6 [报告]
发表于 2008-06-21 20:11 |只看该作者
rsync [OPTION...] SRC... [DEST]
缺少目标地址吧
还有,源地址uid你用的是root,脚本里的用户却是backup@192.168.1.55

论坛徽章:
0
7 [报告]
发表于 2008-06-22 01:03 |只看该作者
不会吧,偶安装了以后根本不用配置。
rsync可使用守护进程或者不用,只要远程和本地都装有rsync就行. rsync可以进行本地到本地,本地到远程,远程到本地拷贝,不能进行远程到远程拷贝。
问题应该是楼上诸位所说的: 你没有指定目标地址
拷贝到当前目录下
rsync -vzrtopg --progress --delete backup@192.168.1.55::backup .

[ 本帖最后由 angeljyt 于 2008-6-22 01:09 编辑 ]

论坛徽章:
0
8 [报告]
发表于 2008-06-23 09:30 |只看该作者

回复 #3 luo118 的帖子

用SSH
[root@hbc ~]# rsync -vzrtopg --delete  -e ssh ftpuser@192.168.1.55:/home/ /home/
The authenticity of host '192.168.1.55 (192.168.1.55)' can't be established.
RSA key fingerprint is c8:8c:76:ba:18:01:d6:8b:fa:46:45:de:f3:9f:76:74.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.55' (RSA) to the list of known hosts.
ftpuser@192.168.1.55's password:
Permission denied, please try again.
ftpuser@192.168.1.55's password:
Permission denied, please try again.
ftpuser@192.168.1.55's password:
Permission denied (publickey,gssapi-with-mic,password).
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)
会出现这个

论坛徽章:
0
9 [报告]
发表于 2008-06-23 09:31 |只看该作者
原帖由 luo118 于 2008-6-20 19:39 发表
其实服务端不用配置的,如果你不是定时运行的,rsync.conf 者不用配置,
可以如下
rsync -vzrtopg --delete  -e ssh root@192.168.1.7:/home/test/ /home/backupl/
或者
rsync -vzrtopg --delete  -e ftp f ...





[root@hbc ~]# rsync -vzrtopg --delete  -e ssh ftpuser@192.168.1.55:/home/ /home/
The authenticity of host '192.168.1.55 (192.168.1.55)' can't be established.
RSA key fingerprint is c8:8c:76:ba:18:01:d6:8b:fa:46:45:de:f3:9f:76:74.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.55' (RSA) to the list of known hosts.
ftpuser@192.168.1.55's password:
Permission denied, please try again.
ftpuser@192.168.1.55's password:
Permission denied, please try again.
ftpuser@192.168.1.55's password:
Permission denied (publickey,gssapi-with-mic,password).
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)

会出现这个问题 怎么解决?

论坛徽章:
0
10 [报告]
发表于 2008-06-23 14:44 |只看该作者
原帖由 1330313150 于 2008-6-23 09:31 发表





[root@hbc ~]# rsync -vzrtopg --delete  -e ssh ftpuser@192.168.1.55:/home/ /home/
The authenticity of host '192.168.1.55 (192.168.1.55)' can't be established.
RSA key fingerprint is c ...



密码认证失败
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP