π One wrong command deleted 300GB of production data. And EVERY backup had failed. This actually happened to GitLab in 2017. π€― An engineer was trying to fix a broken database replica. After hours of troubleshooting, he ran a command to wipe the data directory. But he was on the WRONG server. The live production database was gone. And then things got even worse. π¨ πΎ Cloud backups? Broken because of incompatible PostgreSQL tools. π§ Warning emails? Never delivered. π₯οΈ Disk snapshots? Not enabled for the database servers. π Database replica? Already wiped. GitLab had multiple backup strategies, but none could reliably save them. Then, pure luck saved the day. An engineer had copied a recent database snapshot to a staging server just hours earlier. GitLab recovered, but around six hours of database activity was permanently lost. π₯ The biggest lesson? A backup you have never tested restoring isnβt a backup. Itβs just hope. π¬ When was the last time you tested your backups?
#GitLab #Database #DevOps #SystemDesign #SoftwareEngineering