I'm planning on setting up streaming backups + WAL streaming with Barman from a PostgreSQL 17 instance. From my reading of the documentation, I don't quite understand what will happen in the scenario that I've planned—if it's valid at all.
Here's my proposed server config to place in /etc/barman.d:
[foobar]
description = "foobar streaming backups"
streaming_archiver = true
backup_method = postgres
conninfo = host=foobar user=barman dbname=postgres
streaming_conninfo = host=foobar user=streaming_barman dbname=postgres
slot_name = barman
create_slot = auto
retention_policy = RECOVERY WINDOW OF 14 DAYS
retention_policy_mode = auto
I was thinking of creating a full backup, then just setting up cron to run barman backup --incremental last foobar once every night, so the first incremental backup would be based on the full backup, and every future backup on the the last incremental one. barman cron is of course running as a minutely job.
But I'm confused about the docs on retention policies. In particular, I don't know what this means in practice:
Block-level incremental backups are not considered in retention policies, as they depend on their parent backups and the root backup. Only the root backup is used to determine retention.
So, given the above setup that I've described, what does Barman actually store? Given that we have the single full backup and daily incremental backups on top of that (plus any streamed WAL files in between), what happens when 14 days have elapsed since the initial full backup? I really don't think the documentation makes this clear.
I know of pg_combinebackup and the concept of synthetic full backups, but am not sure in what (if any) manner Barman is using them to achieve the 14-day recovery window.
Mainly I'm concerned about a) if the 14-day recovery window is actually doable with my backup scheme, and b) Barman not just gradually eating away the disk space on my backup server due to me failing to understand how it works.
Could someone explain Barman's operation in this scenario?