WAL存档。失败(请确保WAL运输已设置)。[英] WAL archive: FAILED (please make sure WAL shipping is setup)

本文是小编为大家收集整理的关于WAL存档。失败(请确保WAL运输已设置)。的处理方法,想解了WAL存档。失败(请确保WAL运输已设置)。的问题怎么解决?WAL存档。失败(请确保WAL运输已设置)。问题的解决办法?那么可以参考本文帮助大家快速定位并解决问题。

问题描述

我正在尝试将 Barman 配置为备份.当我执行 barman check replica 时,我不断得到:

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 和 barman 2.1;我不确定问题是什么,有人可以帮忙吗?这是我的 Barman 服务器配置:

description = "Database backup"
conninfo = host=<db-ip> user=postgres dbname=db
backup_method = rsync
ssh_command = ssh postgres@<db-ip>
archiver = on

推荐答案

barman check 尝试通过断言存档中确实存在某些内容来确认存档设置正确.但是,WAL 段通常只有在填满后才会存档,如果您的服务器处于空闲状态,则永远不会发生这种情况.

为了解决这个问题,Barman 提供了一个命令来强制进行段切换,等待完成的 WAL 出现,然后立即将其归档:

barman switch-xlog --force --archive replica

本文地址:https://www.itbaoku.cn/post/1764108.html