18 Adım · DR & Failover Tatbikatı7 min duration
Disaster Recovery (DR) and Annual Failover Drill Checklist
Safe Primary Node Demotion, DNS/VIP Rerouting, and Split-Brain Prevention Step-by-Step
Checklist Progress: 0 / 3
%0
Pre-Drill ValidationCRITICAL
1. Backup Restore Integrity Verified (Restore Drill)?
Before initiating full cluster-level failover drills, confirm that the latest backup has been restored into an isolated sandbox and verified for data integrity and roles. See: /en/postgresql/runbooks/first-restore-drill.
npm run test:drill # veya pg_restore --exit-on-error ile izole sandbox testi
Pre-Drill ValidationCRITICAL
2. Replication Lag Zero?
Confirm zero byte lag between primary and standby replicas before initiating failover.
SELECT application_name, client_addr, state, sync_state, pg_wal_lsn_diff(pg_current_wal_lsn(), replay_lsn) AS lag_bytes FROM pg_stat_replication;
Failover & FencingCRITICAL
3. Old Primary Node Isolated (Fencing)?
Guarantee that the old leader cannot accept writes, eliminating split-brain hazards.
patronictl -c /etc/patroni.yml switchover --master pg-node-01 --candidate pg-node-02