Hall of FameGitLab201717 min readpostmortemadvanced
Postmortem of database outage of January 31
Summary
GitLab.com suffered a major outage and data loss when an engineer accidentally wiped the primary PostgreSQL database during a replication resync attempt. Multiple backup and recovery procedures failed, including `pg_dump` due to a version mismatch and silent cronjob failures, leading to significant data loss.
- An engineer accidentally ran `rm -rf` on the primary PostgreSQL server instead of the secondary during a replication resync.
- `pg_dump` backups failed silently for months due to a PostgreSQL version mismatch (9.2 vs 9.6) and DMARC blocking cronjob emails.
- `pg_basebackup`'s silent hanging behavior during replication setup contributed to engineer confusion.
- LVM snapshots, intended for staging, were the only viable recovery option, resulting in 6-7 hours of data loss.
This postmortem offers a candid and detailed account of multiple cascading failures in operations, backups, and documentation, providing crucial lessons for any team managing critical infrastructure.
8/10



