首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >WAL存档:失败(请确保WAL传送已设置)

WAL存档:失败(请确保WAL传送已设置)
EN

Stack Overflow用户
提问于 2017-03-04 12:03:41
回答 2查看 7.5K关注 0票数 4

我正试着配置Barman作为后援。当我做barman check replica时,我一直得到:

代码语言:javascript
复制
Server replica:
WAL archive: FAILED (please make sure WAL shipping is setup)
PostgreSQL: OK
superuser: OK
wal_level: OK
directories: OK
retention policy settings: OK
backup maximum age: FAILED (interval provided: 1 day, latest backup age: No available backups)
compression settings: OK
failed backups: OK (there are 0 failed backups)
minimum redundancy requirements: FAILED (have 0 backups, expected at least 2)
ssh: OK (PostgreSQL server)
not in recovery: FAILED (cannot perform exclusive backup on a standby)
archive_mode: OK
archive_command: OK
continuous archiving: OK
archiver errors: OK

我正在使用Postgresql 9.6和Barman2.1;我不知道有什么问题需要帮助吗?以下是我的Barman服务器配置:

代码语言:javascript
复制
description = "Database backup"
conninfo = host=<db-ip> user=postgres dbname=db
backup_method = rsync
ssh_command = ssh postgres@<db-ip>
archiver = on
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-03-06 02:28:30

barman check试图通过断言存档中确实存在某种内容来确认归档设置是否正确。但是,WAL段通常只在填充完之后才存档,如果服务器空闲,这是永远不会发生的。

为了解决这个问题,Barman提供了一个命令来强制一个段开关,等待完成的WAL出现,然后立即存档:

代码语言:javascript
复制
barman switch-xlog --force --archive replica
票数 13
EN

Stack Overflow用户

发布于 2019-01-21 08:57:55

简而言之

酒保的incoming_wals_directory和Postgresql.conf的archive_command不匹配,详见这里

详细信息

另一个原因是没有匹配之间的

  • 酒保incoming_wals_directory
  • Postgresql.conf's archive_command

Bash检查

代码语言:javascript
复制
barman@backup $ barman show-server pg | grep incoming_wals_directory
# output1
# > incoming_wals_directory: /var/lib/barman/pg/incoming

postgres@pg $ cat /etc/postgresql/10/main/postgresql.conf | grep archive_command
# output2
# > archive_command = 'rsync -a  %p  barman@staging:/var/lib/barman/pg/incoming/%f' 

我们必须在:output2 1和:2中有相同的路径

如果它们不匹配,那么就让它们匹配,并且不要忘记在之后重新启动postgres。

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

https://stackoverflow.com/questions/42595792

复制
相关文章

相似问题

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