rsync同步备份急需解决办法
1330313150
rsync同步备份急需解决办法
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 [email]backup@192.168.1.55[/email]::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 [email]root@192.168.1.55[/email]::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)
本人新手 谢谢大家指导,或者大家提供我一个简单的方法也行 谢谢了
[[i] 本帖最后由 1330313150 于 2008-6-23 09:25 编辑 [/i]]
real_lufeng
配的乱七八糟的
明明 auth users = root
为什么要用 [email]backup@192.168.1.55[/email] 这样能验证成功才见鬼呢
你到底是要用root用户还是用backup用户呀
你准备把文件备份到哪里呢? 难道只写源地址不用目的地址的吗?
兄弟, 你让我非常无语
luo118
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 [email]backup@192.168.1.55[/email]::backup
改为
rsync -vzrtopg --progress --delete [email]backup@192.168.1.55[/email]::backup /backup/path
luo118
其实服务端不用配置的,如果你不是定时运行的,rsync.conf 者不用配置,
可以如下
rsync -vzrtopg --delete -e ssh [email]root@192.168.1.7[/email]:/home/test/ /home/backupl/
或者
rsync -vzrtopg --delete -e ftp [email]ftpuser@192.168.1.7[/email]:/home/test/ /home/backupl/
culpa
rsync [OPTION...] SRC... [DEST]
缺少目标地址吧
还有,源地址uid你用的是root,脚本里的用户却是[email]backup@192.168.1.55[/email]
angeljyt
:mrgreen: 不会吧,偶安装了以后根本不用配置。
rsync可使用守护进程或者不用,只要远程和本地都装有rsync就行. rsync可以进行本地到本地,本地到远程,远程到本地拷贝,不能进行远程到远程拷贝。
问题应该是楼上诸位所说的: 你没有指定目标地址
拷贝到当前目录下
rsync -vzrtopg --progress --delete [email]backup@192.168.1.55[/email]::backup .
[[i] 本帖最后由 angeljyt 于 2008-6-22 01:09 编辑 [/i]]
1330313150
回复 #3 luo118 的帖子
用SSH
[root@hbc ~]# rsync -vzrtopg --delete -e ssh [email]ftpuser@192.168.1.55[/email]:/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.
[email]ftpuser@192.168.1.55[/email]'s password:
Permission denied, please try again.
[email]ftpuser@192.168.1.55[/email]'s password:
Permission denied, please try again.
[email]ftpuser@192.168.1.55[/email]'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)
会出现这个
1330313150
[quote]原帖由 [i]luo118[/i] 于 2008-6-20 19:39 发表 [url=http://linux.chinaunix.net/bbs/redirect.php?goto=findpost&pid=6622230&ptid=1012220][img]http://linux.chinaunix.net/bbs/images/common/back.gif[/img][/url]
其实服务端不用配置的,如果你不是定时运行的,rsync.conf 者不用配置,
可以如下
rsync -vzrtopg --delete -e ssh [email]root@192.168.1.7[/email]:/home/test/ /home/backupl/
或者
rsync -vzrtopg --delete -e ftp f ... [/quote]
[root@hbc ~]# rsync -vzrtopg --delete -e ssh [email]ftpuser@192.168.1.55[/email]:/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.
[email]ftpuser@192.168.1.55[/email]'s password:
Permission denied, please try again.
[email]ftpuser@192.168.1.55[/email]'s password:
Permission denied, please try again.
[email]ftpuser@192.168.1.55[/email]'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)
会出现这个问题 怎么解决?
culpa
[quote]原帖由 [i]1330313150[/i] 于 2008-6-23 09:31 发表 [url=http://linux.chinaunix.net/bbs/redirect.php?goto=findpost&pid=6624014&ptid=1012220][img]http://linux.chinaunix.net/bbs/images/common/back.gif[/img][/url]
[root@hbc ~]# rsync -vzrtopg --delete -e ssh [email]ftpuser@192.168.1.55[/email]:/home/ /home/
The authenticity of host '192.168.1.55 (192.168.1.55)' can't be established.
RSA key fingerprint is c ... [/quote]
密码认证失败
1330313150
我现在已然有点乱了。。。
希望有人能指点下,或者说是给我一下你们大家做这个的时候的配置让我参考下,不要粘贴复制。谢谢
culpa
你给出的例子是把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的设置。用楼上几位的设置就可以了
1330313150
[quote]原帖由 [i]luo118[/i] 于 2008-6-20 19:34 发表 [url=http://linux.chinaunix.net/bbs/redirect.php?goto=findpost&pid=6622225&ptid=1012220][img]http://linux.chinaunix.net/bbs/images/common/back.gif[/img][/url]
auth failed on module backup from UNKNOWN
找不你定义的 backup 模块
path = /home
comment = BACKUP CLIENT IS SOLARIS 8 E250
ignore errors
read only = yes ... [/quote]
按照你说的我都改了,可是还是出同样的错误~!
real_lufeng
加我qq我帮你做 981853946
看不下去了
julyclyde
[quote]原帖由 [i]1330313150[/i] 于 2008-6-23 15:16 发表 [url=http://linux.chinaunix.net/bbs/redirect.php?goto=findpost&pid=6624505&ptid=1012220][img]http://linux.chinaunix.net/bbs/images/common/back.gif[/img][/url]
我现在已然有点乱了。。。
希望有人能指点下,或者说是给我一下你们大家做这个的时候的配置让我参考下,不要粘贴复制。谢谢 [/quote]
一个冒号是 rsh/ssh 连接的
两个冒号是 rsync 自己的连接
1330313150
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 [email]rsync@192.168.1.55[/email]::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)
怎么解决?