We backup an approximately 1TB database weekly, retaining 2 base backups and all required WALs. A passive server at another location keeps a copy of the backup.
The primary and passive servers have the same size archive volumes. Recently, the passive server has been reporting excessive disk space usage. Upon investigating, it seems the passive server is keeping 3 backups, and only considers the first two as "valid," with the latest showing a status of syncing. Yet everything seems to be up to date. I can't find anything about this "SYNCING" status in the manuals.
Primary Backup:
barman list-backups mydb
mydb 20220619T060004 - Sun Jun 19 09:57:59 2022 - Size: 822.5 GiB - WAL Size: 69.8 GiB
mydb 20220612T060004 - Sun Jun 12 11:56:02 2022 - Size: 825.4 GiB - WAL Size: 355.5 GiB
barman status mydb
Server mydb:
Description: REDACTED
Active: True
Disabled: False
PostgreSQL version: 11.13
Cluster state: in production
pgespresso extension: Not available
Current data size: 814.2 GiB
PostgreSQL Data directory: /var/lib/postgresql/11/main
Current WAL segment: 0000000200002835000000F1
PostgreSQL 'archive_command' setting: barman-wal-archive -c /etc/barman.conf -U mcbackup archive.local mydb %p
Last archived WAL: 0000000200002835000000EF, at Mon Jun 20 17:46:18 2022
Failures of WAL archiver: 1217 (000000020000262600000059 at Sat May 28 08:00:15 2022)
Server WAL archiving rate: 213.97/hour
Passive node: False
Retention policies: enforced (mode: auto, retention: REDUNDANCY 2, WAL retention: MAIN)
No. of available backups: 2
First available backup: 20220612T060004
Last available backup: 20220619T060004
Minimum redundancy requirements: satisfied (2/2)
Secondary:
As you can see, the June 5 and 12 backups are considered the valid ones, whereas the primary server only has the June 12 and 19 backups.
barman list-backups mydb
mydb 20220619T060004 - SYNCING
mydb 20220612T060004 - Sun Jun 12 11:56:02 2022 - Size: 825.4 GiB - WAL Size: 425.2 GiB
mydb 20220605T060003 - Sun Jun 5 09:21:57 2022 - Size: 814.1 GiB - WAL Size: 365.6 GiB
barman status mydb
Server mydb:
Description: REDACTED
Active: True
Disabled: False
Passive node: True
Retention policies: enforced (mode: auto, retention: REDUNDANCY 2, WAL retention: MAIN)
No. of available backups: 2
First available backup: 20220605T060003
Last available backup: 20220612T060004
Minimum redundancy requirements: satisfied (2/2)
SSH command to primary server: REDACTED
Can anyone tell me why this is happening, and how we can avoid it? We consider having two base backups, and all the WALS to recover from either to be sufficient. We are running barman 2.17 on PostgreSQL 11.13
Thank you,
Hugh Ranalli