antdb数据库数据备份提示“ssh output clean: FAILED (the configured ssh_command must not add anything to the remote command output)”该怎么处理?

0 shudaonan 1年前 301次点击

求助,antdb数据库数据备份提示“ssh output clean: FAILED (the configured ssh_command must not add anything to the remote command output)”是为什么,该怎么解决?

共 1 条评论
0 

执行barman check命令时,返回上述报错信息

barman -c /aifs01/users/antdb/barman/conf/datanode0.conf check datanode0

解决方式**

datanode0.conf 的 ssh_command 命令,在最后添加 -q 选项,不产生任何输出信息.

ssh_command = ssh antdb@10.1.242.25 -p 22022 -q

详细的原因说明,请参考:
The test that Barman does is to execute ‘true’ using the ssh_command and checking that the output is empty.

In your case, please check that the following command doesn’t produce any output.

链接:https://groups.google.com/forum/#!topic/pgbarman/1xjUU4mnrfI

确保archive_command和barman配置文件中几个变量值的对应关系

----------archive_command命令示例:
archive_command = 'rsync --address=10.1.242.27 --port=22022 -a %p antdb@10.1.242.27:/aifs01/users/antdb/barman/data/datanode0/incoming/%f'

---------datanode0.conf配置示例:

[barman]
barman_home = /aifs01/users/antdb/barman/data/

[datanode0]

--------两者对应关系:
archive_command命令中的
/aifs01/users/antdb/barman/data/datanode0
必须等于
datanode0.conf配置文件中的 barman_home的配置值 + [datanode0]的配置值
/aifs01/users/antdb/barman/data/datanode0
即:
barman_home的配置值 + [datanode0]的配置值 + 'incoming/%f'固定字符串

原因说明

centos7.2以后,某些ssh场景下需要静默返回输出,即ssh命令添加了 -q 静默选项,否则就报标题所示的错误。

添加一条新评论

登录后可以发表评论 去登录