Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1314635
  • 博文数量: 273
  • 博客积分: 5865
  • 博客等级: 准将
  • 技术积分: 3280
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-11 10:01
文章分类

全部博文(273)

文章存档

2015年(33)

2014年(11)

2013年(11)

2012年(136)

2011年(32)

2010年(50)

分类: LINUX

2013-04-07 16:56:18

原文地址:rsync 错误集合 作者:pk-feiyang

1

[root@bo bin]# /usr/local/rsync/bin/rsync -vazu -progress --delete backup@192.168.1.238::www /tmp --password-file=/etc/backserver.pas

rsync: Failed to exec ss: No such file or directory (2)

rsync error: error in IPC code (code 14) at pipe.c(86) [receiver=2.6.9]

rsync: writefd_unbuffered failed to write 12 bytes [receiver]: Broken pipe (32)

rsync error: error in rsync protocol data stream (code 12) at io.c(1122) [receiver=2.6.9]

[root@ht-store bin]#

以上错误可能是上面使用的参数前面的符号不正确。换成下面的就没有上面的错误了

[root@bo /]# usr/local/rsync/bin/rsync -vzrtopgu --progress --delete --password-file=/etc/backserver.pas backup@192.168.1.238:www /tmp

2

[root@ht-store /]# usr/local/rsync/bin/rsync -vzrtopgu --progress --delete backup@192.168.1.238:www /tmp/ --password-file=/etc/backserver.pas

backup@192.168.1.238's password:

Permission denied, please try again.

backup@192.168.1.238's password:

Permission denied, please try again.

backup@192.168.1.238's password:

Permission denied (publickey,gssapi-with-mic,password).

rsync: connection unexpectedly closed (0 bytes received so far) [receiver]

rsync error: unexplained error (code 255) at io.c(453) [receiver=2.6.9]

[root@ht-store /]#

更改成

[root@ht-store /]# usr/local/rsync/bin/rsync -vzrtopgu --progress --delete --password-file=/etc/backserver.pas

 

backup@192.168.1.238::www /tmp

@ERROR: auth failed on module www

rsync error: error starting client-server protocol (code 5) at main.c(1383) [receiver=2.6.9]

[root@ht-store /]#

3

[root@ht-store /]# /usr/local/rsync/bin/rsync -vazu --progress --delete --password-file=/etc/backserver.pas

 

backserver@192.168.1.238::www /tmp

@ERROR: auth failed on module www

rsync error: error starting client-server protocol (code 5) at main.c(1383) [receiver=2.6.9]

检查一下用户名是否错误backserver 应该是backup

4

[root@ht-store /]# /usr/local/rsync/bin/rsync -vzar --progress --delete --password-file=/etc/backserver.pas backup@192.168.1.238:www /tmp

backup@192.168.1.238's password:

Permission denied, please try again.

backup@192.168.1.238's password:

rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(244) [receiver=2.6.9]

是双引号“::backup@192.168.1.238::www  尔不是单引号“:backup@192.168.1.238:www

5

[root@ht-store /]# /usr/local/rsync/bin/rsync -vzrtopgu --progress --delete --password-file=/etc/backserver.pas backup@192.168.1.238::www /tmp

@ERROR: Unknown module 'www'

rsync error: error starting client-server protocol (code 5) at main.c(1383) [receiver=2.6.9]

这是因为服务器端hosts allow 没有允许该主机访问

6

# chmod 600 rsyncd.conf rsyncd.secrets

-rw-------    1 root     root          795 Aug 23 06:21 rsyncd.conf

-rw-------    1 root     root           37 Aug 23 06:23 rsyncd.secrets

注意:这个安全配置很重要,假如不这样做客户机连接服务器时会提示:

 

@ERROR: auth failed on module smb_recover_files

rsync: connection unexpectedly closed (102 bytes read so far)

rsync error: error in rsync protocol data stream (code 12) at io.c(165)

服务器端日志将出现错误提示:

 

2005/08/23 06:32:01 [8388] secrets file must not be other-accessible (see strict modes option)

2005/08/23 06:32:01 [8388] continuing without secrets file

2005/08/23 06:32:01 [8388] auth failed on module smb_recover_files from documentserver (192.168.0.159)

 

安装Windows rsync安装程序cwRsync_2.0.10_Installer.zip

安装可以一路next

 

同步目录的时候执行

D:\LinuxBak\backup>rsync -vzrtopgu --progress --delete c:\
The source and destination cannot both be remote.
rsync error: syntax or usage error (code 1) at main.c(1068) [receiver=2.6.9]

换一个备份目录就可以了。

 

Windows下采取从文件读取密码方式出现的错误信息

D:inuxBak\bbsweb>rsync -vzrtopgu --progress --delete --password-file=D:\LinuxB
ak\bbsweb\pass.txt
./
password file must not be other-accessible
continuing without password file
Password:

 

必需条件密码文件存放的位置一定要是ntfs分区,另一定要注意是下面的书写格式,--password-file=F:\pw一定要在后面指定

D:\LinuxBak\bbsweb>rsync -vzrtopgu --progress --delete rsync://rsync_user@192.168.6.143/bbsweb ./ --password-file=F:\pw

 

 

当执行以下命令,出现错误信息时

D:\LinuxBak\mysqldb>rsync -vzrtopgu --progress --delete rsync://rsync_user@192.168.6.143/mysqldb ./ --password-file=F:\pw

 

错误信息:

rsync: mkstemp "/cygdrive/d/LinuxBak/mysqldb/mysql/.dbvpopmail081213-14:01.tar.g
z.3favI3" failed: No such file or directory (2)
      101974 100%  529.70kB/s    0:00:00 (xfer#11, to-check=1/15)
rsync: mkstemp "/cygdrive/d/LinuxBak/mysqldb/mysql/.dbvpopmail081213-15:01.tar.g
z.xI3P0F" failed: No such file or directory (2)
      101975 100%  529.71kB/s    0:00:00 (xfer#12, to-check=0/15)

sent 352 bytes  received 1826513 bytes  3653730.00 bytes/sec
total size is 1833358  speedup is 1.00
rsync error: some files could not be transferred (code 23) at main.c(1385) [gene
rator=2.6.9]

 

这是因为在服务器端的备份文件dbvpopmail081213-15:01.tar.gz中有非法符号,可能造成Windows同步数据时无法识别文件名,尔导致问题。将服务器端文件改名为dbvpopmail0812131501.tar.gz 。这样在执行同样的命令就OK了! :) :) :)
阅读(5413) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~