3

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
  • Look carefully at the line telling you minimum redundancy requirements: FAILED (have 0 backups, expected at least 2) – joanolo Mar 4 '17 at 15:08
  • I am more worried about the WAL archive: FAILED (please make sure WAL shipping is setup) line. The other error makes sense to me and seemed valid as I haven't setup backups yet. WAL Archive Failed error should not be coming. – Deepak Puthraya Mar 5 '17 at 2:45
  • What version of Barman are you using? Have you run barman switch-xlog --force --archive <server_name> as noted in the barman documentation to verify WAL archiving is working? – Kassandry Mar 5 '17 at 8:53
7

When running into an error like this, be sure to run barman switch-xlog --force --archive <server_name> as noted in the barman documentation to verify the WAL archiving process.

  • I see a transaction log in my cluster data directory (/pg_xlog), but the command above fails, after the default 30 second itmeout. – sameers Oct 21 '17 at 22:34
  • @sameers You should ask a new question, and post your logs and command outputs to it. – Kassandry Nov 2 '17 at 0:33
0

in brief

Barman's incoming_wals_directory and Postgresql.conf's archive_command not matched as described in details here

details

Another cause is that the not matched between

  • Barman's incoming_wals_directory
  • Postgresql.conf's archive_command

Bash util to check

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' 

We must have same path in :output1 and :output2

Make them matched if they don't and don't forget to restart postgres afterward.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.