免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: 1330313150
打印 上一主题 下一主题

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

论坛徽章:
0
11 [报告]
发表于 2008-06-23 15:16 |只看该作者
我现在已然有点乱了。。。
希望有人能指点下,或者说是给我一下你们大家做这个的时候的配置让我参考下,不要粘贴复制。谢谢

论坛徽章:
0
12 [报告]
发表于 2008-06-23 19:04 |只看该作者
你给出的例子是把rsync当作daemon运行的,不过这种我没做过。
如果是一般命令行的话。
先要建立ssh安全通道,就不用输入密码了,方法如下:
在host1 以user1登陆:

$ssh-keygen -t dsa

连续回车,(默认),不用cypher



在$HOME/.ssh下生成 id_dsa  id_dsa.pub



在host2上以user2登陆:

同样的动作。


然后在host2上 user2的$HOME里 执行
# cp id_dsa.pub authorized_keys   (若是老版本的ssh,可能要用authorized_keys2的文件名)

将host1上的id_dsa.pub重命名host1.pub 拷贝到host2 user2$HOME的.ssh下

然后执行
cat host1.pub >> authorized_keys   

这样就可以从host1用user1登陆host2而不用密码
user1@host1 $ ssh user2@host2

不过ssh版本不能太老。

然后就是rsync的设置。用楼上几位的设置就可以了

论坛徽章:
0
13 [报告]
发表于 2008-06-24 10:34 |只看该作者
哦 我明白你的意思~!

论坛徽章:
0
14 [报告]
发表于 2008-06-24 10:47 |只看该作者
原帖由 luo118 于 2008-6-20 19:34 发表
auth failed on module backup from UNKNOWN
找不你定义的 backup 模块
            
path = /home
comment = BACKUP CLIENT IS SOLARIS 8 E250
ignore errors            
read only = yes            ...




按照你说的我都改了,可是还是出同样的错误~!

论坛徽章:
0
15 [报告]
发表于 2008-06-24 12:20 |只看该作者
加我qq我帮你做 981853946
看不下去了

论坛徽章:
0
16 [报告]
发表于 2008-06-24 12:46 |只看该作者
原帖由 1330313150 于 2008-6-23 15:16 发表
我现在已然有点乱了。。。
希望有人能指点下,或者说是给我一下你们大家做这个的时候的配置让我参考下,不要粘贴复制。谢谢

一个冒号是 rsh/ssh 连接的
两个冒号是 rsync 自己的连接

论坛徽章:
0
17 [报告]
发表于 2008-06-25 14:53 |只看该作者
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
read only = yes
list = no
auth users = root
secrets file = /etc/rsync.passwd

vi rsync.passwd
rsync:admin99
chmod 600 rsyncd.passwd

客户机
vi rsync.passwd
admin99
chmod 600 rsync.passwd
rsync -vzrtopglq --size-only --progress --delete --password-file=/root/rsync.passwd rsync@192.168.1.55::backup /home

@ERROR: auth failed on module backup
rsync: connection unexpectedly closed (90 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(150)

怎么解决?

论坛徽章:
0
18 [报告]
发表于 2010-12-13 22:10 |只看该作者
回复 17# 1330313150

--password-file=/root/rsync.pass密码文件的内容呢??

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



直戳软肋 够狠 哈哈
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP