EnterpriseDB/repmgr

Standby Clone From Barman Error

Closed this issue · 3 comments

Hi

I have three nodes:
pg-node01 (Master)
pg-node02 (Standby)
pg-backup01 (Barman)

I'm using:
PostgreSQL 14
repmgr 5.3
Barman 2.17

All machines are running on Debian 11

I'm trying to clone db from barman on my standby machine as below:

[postgres@pg-node02]$ repmgr -h pg-node01 -U repmgr -d repmgr_db -p 5432 -F standby clone -f /etc/repmgr/repmgr.conf

It returns this error:

NOTICE: destination directory "/var/lib/postgresql/14/main" provided
INFO: connecting to Barman server to verify backup for "server-pg-node01"
WARNING: directory "/var/lib/postgresql/14/main" exists but is not empty
NOTICE: deleting existing directory "/var/lib/postgresql/14/main"
INFO: creating directory "/var/lib/postgresql/14/main/repmgr"...
INFO: connecting to Barman server to fetch server parameters
INFO: connecting to source node
DETAIL: connection string is: host=pg-node01 user=repmgr port=5432 dbname=repmgr_db
DETAIL: current installation size is 41 MB
INFO: replication slot usage not requested;  no replication slot will be set up for this standby
NOTICE: retrieving backup from Barman...
ERROR: cannot open file: /var/lib/postgresql/14/main/repmgr/backup.info
postgres@pg-node02:~$ EXCEPTION: [Errno 32] Broken pipe
See log file for more details.
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe

Here is the screenshot:

Screenshot 2021-12-18 at 12 37 36

Any helps would be appreciated..

It looks like the expected backup.info file is not being copied from the Barman server for some reason.

Can you try re-running the clone action with log_level set to DEBUG, e.g.:

repmgr -h pg-node01 -U repmgr -d repmgr_db -p 5432 -F standby clone -f /etc/repmgr/repmgr.conf -L DEBUG

This might give some more clues about what is happening.

Hi,
You need to delete your folder "main", and create a new folder in your Standby "main" empty.

Closing this as we haven't had a reply to Ian's message in over 9 months