I'm currently testing barman as replacement for BART. In our production env, we have 1 primary and 2 standbys. I'd like for barman to be able to backup with minimal intervention if we have a switchover/failover.
The below is my server config. I'm having 3 hosts there, and its directed to connect to the primary DB.
description = "PG14TEST Database (Streaming) "
conninfo = "host=ooge-pgdb01,ooge-pgdb02,ooge-pgdb04 port=5431 user=barman dbname=postgres target_session_attrs=read-write"
streaming_conninfo = "host=ooge-pgdb01,ooge-pgdb02,ooge-pgdb04 port=5431 user=streaming_barman target_session_attrs=read-write"
backup_method = postgres
streaming_archiver = on
archiver = on
slot_name = barman_pg14test
create_slot = auto
path_prefix = /u01/app/postgres/product/14.4.0/db_1/bin
backup_compression = gzip
backup_compression_format = tar
backup_compression_location = client
retention_policy = "RECOVERY WINDOW OF 3 DAYS"
compression = gzip
In our test env, I have no problems backing up even when there is failover/switchover.
So far, restore seems to be working across switchovers as well. Do you see any issue with this kind of setup?