遇到错误1: [root@backup tmp]# rsync -avz /etc/hosts -e 'ssh -p 22' root@172.16.1.5:/tmp/ rsync: Failed to exec ssh: No such file or directory (2) rsync error: error in IPC code (code 14) at pipe.c(84) [sender=3.0.6] rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6] 从网上找打解决方法讲是没有安装openssh客户端,然后安装尝试一下 [root@backup tmp]# yum -y install openssh-clients.x86_64 安装完成之后有执行一次,发现错误提示变了,说明刚才那个错误已解决然后开始解决新的报错问题 从本地服务器上推送文件到172.16.1.5这台服务器上,发现一直提示这个错误信息。然后在网上找各种解决方法,最终得以解决。 [root@backup tmp]# rsync -avz /tmp/hosts -e 'ssh -p 22' root@172.16.1.5:/tmp/ root@172.16.1.5's password: bash: rsync: command not found rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6] 造成这种原因是因为172.16.1.5这台服务上没有安装rsync这个软件包,安装后得以解决 [root@backup tmp]# rsync -avz /tmp/hosts -e 'ssh -p 22' root@172.16.1.5:/tmp/ root@172.16.1.5's password: sending incremental file list hosts sent 124 bytes received 31 bytes 62.00 bytes/sec total size is 158 speedup is 1.02 [root@lb01 tmp]# ifconfig eth1| awk -F "[ :]+" 'NR==2 {print $4}' 172.16.1.5 [root@lb01 tmp]# ls /tmp/ hosts
对端没有配置文件里面的目录不存在 [root@nfs01 sh]# rsync -avz /backup/ rsync_backup@172.16.1.41::backup/ --password-file\=/etc/rsync.password @ERROR: chdir failed rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6] 对端配置文件里面的目录存在,但是权限被拒绝 [root@nfs01 sh]# rsync -avz /backup/ rsync_backup@172.16.1.41::backup/ --password-file\=/etc/rsync.password sending incremental file list ./ rsync: failed to set times on "." (in backup): Operation not permitted (1) 1/ rsync: recv_generator: mkdir "1" (in backup) failed: Permission denied (13) *** Skipping any contents from this failed directory *** sent 46 bytes received 15 bytes 122.00 bytes/sec total size is 0 speedup is 0.00 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]
模块名称错误 [root@nfs01 sh]# rsync -avz /backup/ rsync_backup@172.16.1.41::baskup/ --password-file\=/etc/rsync.password @ERROR: Unknown module 'baskup' rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]
服务端虚拟用户不存在 [root@nfs01 sh]# rsync -az /backup/ rsync_backup@172.16.1.41::backup/ --password-file\=/etc/rsync.password @ERROR: invalid uid rsync rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]
服务端没有backup模块里面的密码文件,客户端和服务端的密码文件密码不一致 [root@nfs01 sh]# rsync -az /backup/ rsync_backup@172.16.1.41::backup/ --password-file\=/etc/rsync.password @ERROR: auth failed on module backup rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]
在传输的时候远程模块名称前面多写了一个“/” [root@nfs01 /]# rsync -avz /tmp/ rsync_backup@172.16.1.41::/backup/ --password-file\=/etc/rsync.password ERROR: The remote path must start with a module name not a / #远程路径必须是模块名称 rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6] |
|