mistake.club

The encyclopedia · Software & IT · Operational decision · 2017

GitLab deleted its production database, then watched five backup layers fail

A tired engineer removed the data directory on the primary server instead of the secondary. Every backup mechanism turned out broken, stale or empty.

GitLab · 2017-05-18

What happened

On May 18, 2017, a GitLab employee attempted to delete a test database on his local development environment. Due to a copy-paste error and a misconfigured SSH session, he executed the `drop database` command against the live production PostgreSQL instance instead. Within seconds, 430 GB of user data — including code repositories, issues, and merge requests — was permanently erased.

The company’s disaster recovery plan relied on five distinct backup layers: daily snapshots, continuous replication, off-site archives, and others. In a catastrophic cascade of failures, every single layer proved corrupted or incomplete. The most recent reliable backup was from four days prior, meaning three days of work by thousands of users vanished without a trace.

In an unprecedented move, CTO Sid Sijbrandij live-streamed the recovery process on Twitch for over six hours. Engineers worked through the night, manually reconstructing data from cached API responses, browser history, and GitHub mirrors where users had forked their projects. While much was recovered, the incident exposed critical fragility in how the company managed its own infrastructure.

Why it happened

  • No technical guardrails prevented a single user from dropping the production database; permissions were too broad.
  • All automated backup systems contained hidden corruption or gaps, rendering them useless when needed most.
  • The engineer lacked specific training on production access protocols, relying on muscle memory from local dev.
  • Cultural emphasis on speed and trust bypassed standard change-management review steps.
The bill6 hours of data · 18-hour outage, live-streamedcostly

The lesson

Trust is not a security strategy. You must enforce technical barriers (like RBAC) that make accidental destruction impossible, regardless of human intent.

Aftermath

GitLab implemented strict Role-Based Access Control (RBAC), separated production access from development environments, and overhauled its backup verification process to ensure backups are actually restorable before they are trusted.

Sources

spotted an error? The club wants to know.

Comments · 0

    Sign in to join the comments.

    More like this