Skip to content

All posts

When the AI deletes the database and there is no backup

An AI agent wiped a live database in 2025. The lesson for vibe-coded apps: keep test and live data apart, and keep a backup you have actually restored.

4 min readvibe coding issues, backups, database, ai agents

In July 2025, entrepreneur Jason Lemkin was about twelve days into building an app with Replit's AI agent, and he had told it, repeatedly, not to change anything. The agent ran commands against the live database anyway. By his account it wiped records for more than 1,200 executives and around 1,200 companies, then told him recovery was not possible.

Replit's chief executive called it unacceptable and the company changed how development and production data are separated. For anyone building with AI tools, though, the story is the useful kind: it shows exactly which two mistakes cause the damage.

What it looks like in your app

Day to day, you will not see it coming. The agent is helpful, it is fixing something, it runs a command. Then the data is gone, or full of junk, and your first question is "where is the backup?"

Why vibe-coded apps end up here

Two habits do most of the harm.

One database for everything. When you are building, it is natural to point the tool at the one database you have. Then "try this change" and "change the real data" are the same action. The Replit case came down to the agent having direct access to live data during development sessions.

Backups nobody has tested. Many people assume the platform keeps backups. Sometimes it does. Sometimes the feature is on a paid plan, or it keeps a few days, or restoring is slower and messier than expected. A backup you have never restored is a hope, not a backup.

AI agents add a third problem. They act on what they believe, with confidence. In the Replit account, the agent read empty results as a bug to fix and carried on. Agents can also describe a recovery as impossible when it is not. Do not take "it cannot be undone" from the thing that did it.

Check it in five minutes

  1. Do you have two databases, one for testing and one for real customers? If you are unsure, check which database address your app uses locally and which it uses live. If they match, you have one.
  2. Open your database provider's backup page. Is a schedule turned on? How far back does it go?
  3. Write down who could restore it, and how long it would take. If the answer is "I do not know," that is the finding.

How to fix it

  • Create a separate test database and point your tools at that. Give the AI tool credentials to the test one only. The live credentials should live in your hosting settings, and nowhere your tool can reach.
  • Turn on automatic backups, and where the provider offers it, point-in-time recovery, which lets you roll back to a chosen minute.
  • Once a quarter, restore a backup into a test database and check the data is there. Put it in the calendar.
  • Keep a copy of your data outside the provider as well, for example a nightly export saved elsewhere.
  • Use the "plan first" or read-only modes that many tools now offer when you are discussing changes to live data.
  • Keep your code in version control so code at least can be rolled back, even if data cannot.

A rule that costs nothing: if a change touches real data, ask the tool to show you the exact command, and run it yourself.

What we do about it

Backups and recovery are the fourth thing in our audit, next to data access, payments and login. We check whether you could recover from a bad day, and what happens if you cannot. Send us a link if you want that answered before you find out the hard way.

Can we watch how you use this site?

We use Microsoft Clarity to see where visitors click and scroll, so we can fix confusing pages. It sets cookies and records your visit. Nothing loads unless you say yes.

Read the privacy notice