Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WAL archive: FAILED (please make sure WAL shipping is setup)

I am trying to configure Barman to backup. When I do a barman check replica I keep getting:

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

I am using Postgresql 9.6 and barman 2.1; I am not sure as to what the issue is could someone help? Here is my Barman server configuration:

description = "Database backup"
conninfo = host=<db-ip> user=postgres dbname=db
backup_method = rsync
ssh_command = ssh postgres@<db-ip>
archiver = on
like image 488
Deepak Puthraya Avatar asked Dec 05 '22 15:12

Deepak Puthraya


1 Answers

barman check tries to confirm that archiving is set up correctly by asserting that there's actually something in the archive. However, WAL segments are generally only archived once they're filled up, and if your server is idle, this is never going to happen.

To work around this, Barman provides a command to force a segment switch, wait for the completed WAL to show up, and then archive it immediately:

barman switch-xlog --force --archive replica
like image 165
Nick Barnes Avatar answered May 24 '23 01:05

Nick Barnes