Planet PostgreSQL·· 2d ago
Routine OS Patching Broke PostgreSQL Backups by Mismatching pgBackRest Versions
semab tariq: A Routine OS Patch Quietly Broke Our Production Backups
Brief · Based on the source excerpt
Routine OS patching upgraded pgBackRest on the production PostgreSQL server from 2.55.1 to 2.59.3 but left the backup server on 2.55.1, causing the next morning’s backup to fail. There was no downtime or data loss, but for several hours the newest backup was more than a day old.
Why It Matters
With a separate backup server, locking pgBackRest versions and checking both hosts after patching can reduce the risk of backup failure.
Technical Breakdown · Distilled from the original source
Why an OS patch can update pgBackRest
- During a PostgreSQL minor upgrade last month, the PGDG repository file was restored to its original name so
dnfcould find the required packages. The database upgrade itself went smoothly. - When the PGDG repository is visible to
dnf, routine OS patching can also update database tools installed from it. In this case, patching updatedpgBackReston the production database server but left the backup server unchanged.
Version checks and diagnostic order
pgBackRestrequires exactly matching versions before it proceeds. The production host moved from 2.55.1 to 2.59.3 while the backup host stayed on 2.55.1, so the next morning’s backup failed within seconds.- The subsequent
unable to find primary clustermessage was a side effect. The version error is the better starting point than checking replication. The database stayed online and no data was lost, but for several hours the newest backup was more than a day old.
Add backup checks to the patch cycle
- The recommended safeguards are to lock the
pgBackRestversion, verify both hosts after each patch cycle, and make hiding the PGDG repository again a standard step.
Source: Planet PostgreSQL· postgr.es
PG Radar summarizes verified changes and impact. Read the original post for full technical details and code samples.