Skip to content

HOWTO: Run a DR Failback After PostgreSQL Recovery

Failback completes the DR loop: after a failover, the original primary must be safely restored as a replica, re-synchronised, and optionally promoted back to primary. This HOWTO covers the full failback sequence in a Patroni-managed cluster: rebuilding the original node via pgBackRest, reattaching it as a streaming replica, and executing a controlled switchback if required. The goal is a clean cluster topology with a complete run-record trail that closes the DR drill record.

What this covers:

  • Rebuilding the original primary as a replica using pgbackrest restore with Patroni integration
  • Replica re-synchronisation validation: replication lag, WAL catch-up, and Patroni member state
  • Optional controlled switchback: patronictl switchover to restore original primary role with matching run records

Learn this in Academy: Disaster Recovery Automation track