Backup of newly promoted standby

30 views
Skip to first unread message

Victor Honoritus

unread,
Jun 5, 2025, 3:16:22 PMJun 5
to Barman, Backup and Recovery Manager for PostgreSQL
Hello, we have 3 DC:

DC1 db01 (master)
DC2 db02 (standby)
DC3 db03 (standby)

A simple streaming replication is set from master node to standby nodes. No external tools for automatic failover (patroni, repmgr etc.) will be used. If master fails, we will manually promote to one of the standby nodes.

We would like to use Barman for our backup solution (backup_method = postgres, since we don't have a big database), in barman configuration we specify the ip address of the db01 (master) node.

The question is, what happens if db01 (current master) fails and we promote db02?
Do we reconfigure Barman to take backups from db02 (the new master)?
Or would it be better to try to recover db01, bring it back as master, and keep the Barman config as it is?
Is there a way to configure Barman with multiple possible primary nodes and let it choose the active one?

We are not sure what the best approach is in this situation, especially since the Barman config points to a static ip and does not dynamically detect the current master. Would appreciate any advice or experience with similar setups.

Thank you

Martin Marques

unread,
Jun 6, 2025, 3:02:39 AMJun 6
to pgba...@googlegroups.com
Hi Victor,

On Thu, 5 Jun 2025 at 21:16, Victor Honoritus <victorh...@gmail.com> wrote:
>
> The question is, what happens if db01 (current master) fails and we promote db02?
> Do we reconfigure Barman to take backups from db02 (the new master)?
> Or would it be better to try to recover db01, bring it back as master, and keep the Barman config as it is?
> Is there a way to configure Barman with multiple possible primary nodes and let it choose the active one?
>
> We are not sure what the best approach is in this situation, especially since the Barman config points to a static ip and does not dynamically detect the current master. Would appreciate any advice or experience with similar setups.

Take a look at the configuration models section:
https://docs.pgbarman.org/release/3.14.0/user_guide/configuration.html#configuration-models

Given that you are going to manually failover, I would add the
reconfiguration via a new or existing model as part of the failover
process.
Reply all
Reply to author
Forward
0 new messages