我有两个服务器,都是Mandriva 2010.2,具有完全相同版本的rdiff备份(1.3.3)和完全相同的rsync。我以前经常在debian中使用rdiff备份,但从那以后我就转向了不同的操作系统。当我尝试使用rdiff备份时,我只会得到很多错误。但是通过rsync连接是非常好的。
如下所示:
根@localhost var# rsync --rsh='ssh -p24752‘-avz -e @example.com.au:/var/test/var/备份发送增量文件列表drwxr-xr-x4096 2012/06/22 13:27:38已发送的39字节接收到13字节104.00字节/秒总大小为0.00
但是当我尝试通过rdiff备份运行它时,会发生这样的情况。
[root@localhost var]# rdiff-backup --remote-schema 'ssh -C %s -p 24752' -v9 --print-statistics root@example.com.au::/var/test /var/backup
Fri Jun 22 13:45:20 2012 Using rdiff-backup version 1.3.3
Fri Jun 22 13:45:20 2012 Executing ssh -C root@example.com.au -p 24752
/usr/lib64/python2.6/site-packages/rdiff_backup/SetConnections.py:148: DeprecationWarning: os.popen2 is deprecated. Use the subprocess module.
stdin, stdout = os.popen2(remote_cmd)
Fri Jun 22 13:45:20 2012 Client sending (0): ConnectionRequest: Globals.get with 1 arguments
Fri Jun 22 13:45:20 2012 Client sending (0): 'version'
Pseudo-terminal will not be allocated because stdin is not a terminal.
stdin: is not a tty
-bash: line 1: syntax error near unexpected token `crdiff_backup.connection'
-bash: line 1: `oh(crdiff_backup.connection'
Fri Jun 22 13:45:20 2012 Fatal Error: Truncated header string (problem probably originated remotely)
Couldn't start up the remote connection by executing
ssh -C root@example.com.au -p 24752
Remember that, under the default settings, rdiff-backup must be
installed in the PATH on the remote system. See the man page for more
information on this. This message may also be displayed if the remote
version of rdiff-backup is quite different from the local version (1.3.3).当我使用下面的命令字符串复制和粘贴失败的连接时,它立即运行得非常好(已经设置了密钥对)
根@localhost var# ssh -C root@example.com.au -p24752最后登录: Fri Jun 22 13:39:37 2012从203-217-31-220.perm.iinet.net.au
两台服务器都是根服务器,两组文件都存在。我尝试使用“-t-t”命令来消除stdin错误,但这会导致python异常:/。
对如何进行有什么想法吗?
编辑:这也是当我不使用自定义模式时它所做的事情(大致相同,但是端口22拒绝连接,因为我们不使用它:P
[root@localhost rdiffinstall]# rdiff-backup -v9 --print-statistics root@example.com.au::/var/test /var/backup
Fri Jun 22 14:24:06 2012 Using rdiff-backup version 1.2.8
Fri Jun 22 14:24:06 2012 Executing ssh -C root@intranet.qk.com.au rdiff-backup --server
/usr/lib64/python2.6/site-packages/rdiff_backup/SetConnections.py:148: DeprecationWarning: os.popen2 is deprecated. Use the subprocess module.
stdin, stdout = os.popen2(remote_cmd)
Fri Jun 22 14:24:06 2012 Client sending (0): ConnectionRequest: Globals.get with 1 arguments
Fri Jun 22 14:24:06 2012 Client sending (0): 'version'
ssh: connect to host example.com.au port 22: Connection refused
Fri Jun 22 14:24:06 2012 Fatal Error: Truncated header string (problem probably originated remotely)
Couldn't start up the remote connection by executing
ssh -C root@example.com.au rdiff-backup --server
Remember that, under the default settings, rdiff-backup must be
installed in the PATH on the remote system. See the man page for more
information on this. This message may also be displayed if the remote
version of rdiff-backup is quite different from the local version (1.2.8).发布于 2013-12-12 12:22:47
问题是,您的服务器正在以shell的形式运行bash,而不是rdiff-backup --server (它可以理解其'oh(crdiff_backup.connection'命令)。对我来说,解决办法要么是:
ssh -C %s -p 24752 rdiff-backup --server。rdiff-backup --server (如果在脚本中使用它,也会更安全)。https://serverfault.com/questions/401186
复制相似问题