0

I am setting up a barman server to backup a remote PostgreSQL server and am digging my way through a bunch of FAILED messages I get on barman check [pg]

Server pg:
        WAL archive: FAILED (please make sure WAL shipping is setup)
        replication slot: FAILED (slot 'barman' not initialised: is 'receive-wal' running?)
        receive-wal running: FAILED (See the Barman log file for more details)

I have the following values (which I believe to make sure 'WAL shipping' is enabled) on the PostgreSQL server's postgresql.conf

wal_level = replica
archive_mode = on
archive_timeout = 60
archive_command = 'test ! -f /opt/db/backup/postgres/archives/%f && cp %p [email protected]:/opt/barman/pg/incoming/%f'

what am I missing here to get this going?


Addition:

based on the comment by @jjanes below I tried to new versions of the archive_command

neither ...

archive_command = 'test ! -f vm-51150-0180.step.zrz.dvz.cn-mv.de:/opt/barman/pg/incoming/%f && scp %p [email protected]:/opt/barman/pg/incoming/%f'

... nor ...

archive_command = 'test ! -f [email protected]:/opt/barman/pg/incoming/%f && scp %p [email protected]:/opt/barman/pg/incoming/%f'

... have any effect on the FAILED status though unfortunately

2
  • You command looks wrong. That looks like it was meant to be a scp command, not cp.
    – jjanes
    Dec 6, 2021 at 19:21
  • And your test doesn't make any sense, you should test the same destination you copy to, not some other destination.
    – jjanes
    Dec 6, 2021 at 19:23

1 Answer 1

0

receive-wal running: FAILED (See the Barman log file for more details)

And what did you find in the barman log file?

replication slot: FAILED (slot 'barman' not initialised: is 'receive-wal' running?)

Replication != Archiving
I seem to recall that barman uses Replication to get hold of WAL files and your database is complaining about the "barman" replication slot.
The Archiving command is something separate.

test ! -f vm-51150-0180.step.zrz.dvz.cn-mv.de:/opt/barman/pg/incoming/%f

To paraphrase one Inigo Montoya:

That command you keep using; I do not think it does what you think it does..."

Does this command actually work?
I've never come across a version of test that could examine a file on a remote machine without going through a mounted file share.

I believe that barman is a third-party product, supported by what used to be "2nd Quadrant" (now "EDB"?).
Have you tried asking their opinion about their product?

1
  • 1.) yes, I am active with similar questions on the barman mailing list ... no solution yet from there neither ... 2.) as far as I know the archive_command actually does play a role. i.e. the target dir must match some setting on the barman server. I have to admit that I do not know much on conventional psql backup tools (which may be part of my problem) ... 3.) yes there is that replication slotFAIL as well. I was just starting from the top of the list (which may or may not the right approach) and haven't gotten to that issue yet.
    – vrms
    Dec 7, 2021 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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