An outage lost customer data: how to make sure it can't happen twice

After data loss: what to do now, how to find the root cause, and which controls prevent a repeat: tested backups, replicas, monitoring and drills.

The short answer

First stabilize and recover what you can. Then run a blameless review to find the root cause, which is usually a missing control rather than one person's mistake. Prevent a repeat with backups you restore on a schedule, files and data stored where a lost server cannot take them, monitoring that includes silence, and a rehearsed recovery. Tell customers plainly, and check your legal duties.

On this page
  1. What do you do right now?
  2. What do you tell customers?
  3. Is it a legal incident?
  4. How do you find the root cause?
  5. Which controls prevent a repeat?
  6. How do you rebuild trust?
  7. What if nothing can be recovered?
  8. Working with us

Data is gone. Maybe a disk failed, a migration dropped a table, or a backup turned out to be empty. Customers are asking questions. This is the worst day a SaaS team has, and what you do in the following weeks decides whether trust recovers.

What do you do right now?

  1. Stop the damage. Prevent further writes that could overwrite recoverable data. Pause jobs if needed. Do not run “cleanup” commands.
  2. Preserve evidence. Copy logs, disk images and the failed system before you rebuild it.
  3. Find every copy. Backups, replicas, exports, old servers, files in object storage, a developer’s local copy, a customer’s own export. Check each one, and write down what each contains and from when.
  4. Restore into a separate place first, never over the live system, and compare what you recovered.
  5. Work out what is lost. Which customers, which time range, which kinds of data.

What do you tell customers?

Promptly and plainly: what happened, what data is affected, what you have recovered, what they need to do, and when you will update them. Do not guess or minimize. Update on the time you promised even when there is nothing new.

Possibly. Under the GDPR, a personal data breach covers accidental loss or destruction of personal data, not only theft. A controller must notify the supervisory authority without undue delay and, where feasible, within 72 hours of becoming aware, unless the breach is unlikely to result in a risk to people (Article 33). A processor must tell the controller without undue delay. Your customer contracts may set their own deadlines. Involve a lawyer at once. This is not legal advice.

How do you find the root cause?

Hold a blameless review within days, while memory is fresh. Ask “how did our system allow this?”, not “who did this?”. Use the five-whys method until you reach a missing control:

  • “The table was dropped” because a migration did it; because the migration was applied directly to production; because there was no staging copy; because…
  • “The backup was empty” because the dump was cut short; because the disk filled; because nothing checked the result.

Write down the timeline, the cause, what worked, what did not, and the actions, each with an owner and a date.

Which controls prevent a repeat?

Most data-loss incidents fall into a few groups. For each, the control and how to prove it.

Backups that are real

  • Back up automatically, including files, in one set that restores together.
  • Restore on a schedule into a throwaway database, compare with live, and report the result. Prove the check can fail by feeding it a truncated dump. We run this nightly on our products; see nightly restore drills.
  • Keep backups in a different place from the thing they protect.
  • Know your recovery time by measuring a restore at today’s size.

Silence is a failure

The worst failures make no noise: a backup timer that was disabled, a drill that stopped running. Have each scheduled job report success to a checker outside your servers, and alert when a report is missing. See uptime checks outside the server.

No important state on one machine

Data in a database server and files in object storage, not on the app server’s disk, so losing a server does not lose data; see designing a SaaS that can move servers. Consider a replica or point-in-time recovery for the database so you can restore to a moment before the damage.

Safer changes

  • Migrations are expand and contract: add first, backfill, switch reads, drop in a later release. Never drop a column in the release that stops using it.
  • Rehearse risky changes on a copy of production, compare results, and keep a written way back for a fixed time. See our SQLite to PostgreSQL move.
  • Restrict who can run destructive commands on production, and use a staging environment that looks like it.
  • Soft delete or a recycle period for user-facing deletions, where privacy rules allow.

Rehearsed recovery

A runbook nobody has followed is a guess. Run a recovery drill at least twice a year: pick a scenario, have someone who did not write the runbook follow it, and fix what is unclear.

How do you rebuild trust?

Publish a short account of what happened and what you changed, without internal details. Then keep the promises, and show the changes in your next customer conversations. Customers who see a rehearsed, tested recovery will accept an incident better than ones who hear “we are looking into it”.

What if nothing can be recovered?

Then say so, early and exactly. Tell customers what is lost, from when to when, and what they can do: re-upload, re-enter, or export from their own copies. Offer practical help for the biggest cases. Record the loss in your incident log with the legal assessment, and check your contracts for notification and liability terms with a lawyer. Then treat the missing control as the first item of the prevention plan, and measure that it works by restoring from it in front of someone who was not involved.

Working with us

If you have lost data, or fear you could, we can help check what is recoverable, establish tested backups and monitoring, and put the controls above in place without stopping your product. Describe the situation through contact, or see our SaaS platform work.

Keep reading

Tell us what you want to build.

A product, a website, a search problem or a system that should work better. We reply with a plain answer and the first step.

A few sentences are enough (at least 20 characters).

We use your details only to answer your inquiry. See our privacy policy.