我正试着配置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和Barman2.1;我不知道有什么问题需要帮助吗?以下是我的Barman服务器配置:
description = "Database backup"
conninfo = host=<db-ip> user=postgres dbname=db
backup_method = rsync
ssh_command = ssh postgres@<db-ip>
archiver = on发布于 2017-03-06 02:28:30
barman check试图通过断言存档中确实存在某种内容来确认归档设置是否正确。但是,WAL段通常只在填充完之后才存档,如果服务器空闲,这是永远不会发生的。
为了解决这个问题,Barman提供了一个命令来强制一个段开关,等待完成的WAL出现,然后立即存档:
barman switch-xlog --force --archive replica发布于 2019-01-21 08:57:55
简而言之
酒保的incoming_wals_directory和Postgresql.conf的archive_command不匹配,详见这里
详细信息
另一个原因是没有匹配之间的
incoming_wals_directoryarchive_commandBash检查
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。
https://stackoverflow.com/questions/42595792
复制相似问题