首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Barman地理冗余配置错误

Barman地理冗余配置错误
EN

Stack Overflow用户
提问于 2020-11-11 20:43:39
回答 1查看 177关注 0票数 0

我试图在我的酒保设置上配置geo冗余,但是当我试图从主备份复制到安全备份时,我的配置是:

服务器1

虚拟盒12

  • 192.168.0.103

  • /etc/barman.conf

上的

  • Ubuntu 18
  • Postgres

代码语言:javascript
复制
backup_method = rsync
archiver = on
compression = gzip
reuse_backup = link
backup_options = concurrent_backup
parallel_jobs = 2
network_compression = true
basebackup_retry_times = 20
basebackup_retry_sleep = 120

  • /etc/barman.d/comauto_20200921_95

代码语言:javascript
复制
[comauto_20200921_95]
description =  "Comauto Local Postgres 9.5 - 21/09/2020"
conninfo = host=192.168.0.102 user=barman dbname=postgres
ssh_command = ssh postgres@192.168.0.102
retention_policy = RECOVERY WINDOW OF 2 WEEKS
backup_options = exclusive_backup

服务器2

虚拟盒上的

  • Ubuntu 18 --
  • Postgres 9.5
  • ifconfig =

代码语言:javascript
复制
backup_method = rsync
archiver = on
compression = gzip
reuse_backup = link
backup_options = concurrent_backup
parallel_jobs = 2
network_compression = true
basebackup_retry_times = 20
basebackup_retry_sleep = 120
; the only difference
primary_ssh_command = barman@192.168.0.103

  • /etc/barman.d/comauto_20200921_95

代码语言:javascript
复制
[comauto_20200921_95]
description =  "Comauto Local Postgres 9.5 - 21/09/2020"
conninfo = host=192.168.0.102 user=barman dbname=postgres
ssh_command = ssh postgres@192.168.0.102
retention_policy = RECOVERY WINDOW OF 2 WEEKS
backup_options = exclusive_backup

服务器1上的

代码语言:javascript
复制
sudo su barman
ssh barman@192.168.0.102 -C true
 # OK
barman check comauto_20200921_95
 # All OK
barman backup comauto_20200921_95
 # OK
barman list-backup comauto_20200921_95
 # comauto_20200921_95 20201111T172643 - Wed Nov 11 17:26:50 2020 - Size: 6.2 GiB - WAL Size: 0 B
 # comauto_20200921_95 20201111T114656 - Wed Nov 11 11:47:08 2020 - Size: 6.2 GiB - WAL Size: 79.9 KiB
 # comauto_20200921_95 20201111T112906 - Wed Nov 11 11:33:10 2020 - Size: 6.2 GiB - WAL Size: 96.4 KiB

错误发生在这里,

服务器2上的

代码语言:javascript
复制
sudo su barman
ssh barman@192.168.0.103 -C true
 # OK
barman check comauto_20200921_95
 # WAL archive: FAILED
 # ssh: FAILED (Connection failed using 'barman@192.168.0.103 -o BatchMode=yes -o StrictHostKeyChecking=no' return code 127)
barman cron
 # ERROR: Failed to retrieve the primary node status: sync-info execution on remote primary server comauto_20200921_95 failed: /bin/sh: 1: barman@192.168.0.103: not found
barman list-backup comauto_20200921_95
 #
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-11-12 07:21:29

一个明显的问题是,primary_ssh_command缺少了实际的ssh;大概应该是:

代码语言:javascript
复制
; the only difference
primary_ssh_command = ssh barman@192.168.0.103

参见此处文档中的示例:https://docs.pgbarman.org/#configuration-1

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64793839

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档