Raddu / Learn

When the whole database is gone

In this unit you'll learn

  • What Raddu does before an agent deletes infrastructure
  • Where restore points must live for this to work
  • How raddu recover works, and what can still be lost

The incident Raddu was built for, at its worst

An agent with your platform's token can delete the volume your database lives on, or the whole project, with one command. Row-by-row undo can't help: there are no rows left. Raddu covers this case in three parts.

1. It asks first

Before the agent deletes infrastructure (a Railway, Fly, Heroku, Supabase, Neon or DigitalOcean volume, app, project or database; terraform destroy, Pulumi, CDK; AWS, Google Cloud or Azure databases and disks; Kubernetes volume claims and namespaces; a DELETE to a provider's API; the Supabase and Neon MCP tools that delete or pause; the Docker volume your database lives on), Raddu:

  1. Makes sure a restore point covers the databaseIf anything was written since the newest one, it stores a fresh one first.
  2. Asks youIn Claude Code you get a Yes / No question naming what would be deleted and the restore point you'd have. In Cursor, whose Run Everything mode skips questions, Raddu refuses and tells you to run the command yourself if you mean it.
note

Raddu reads commands, it doesn't search text: echo "terraform destroy", a commit message or a grep pattern stays silent. On 4,251 real agent commands it raised 0 false alarms.

2. Restore points live out of reach

raddu check says where your restore points are compared with the database: on the same server, at the same provider, on this laptop, or off-site. For a hosted database, keep them off your machine: raddu storage set --hosted (Pro) or your own S3-compatible bucket with object lock. While an agent works, the newest restore point is never more than 30 minutes behind, and the agent's row changes and commands are copied to locked storage after every command.

3. raddu recover brings it back

raddu recover --to $NEW_DB
raddu recover --to $NEW_DB --yes

The first line previews and changes nothing; the second restores. $NEW_DB is the URL of a new, empty database: a new Supabase project, a new Railway Postgres, or any Postgres of the same major version or newer.

It restores the newest restore point into the new database in one transaction, checks every row count, and lists exactly what the agent did after that restore point (its row changes per table, and its commands), saved with old and new rows for you to review. It won't write into your protected database (that's raddu undo --all) or into one that already has rows.

On Supabase, your users come back too: the restore point carries a copy of the accounts (password hashes, identities, MFA factors), and recover loads it into the new project's empty auth schema, then checks that every row pointing at a user finds its account. Sessions aren't copied, so everyone signs in again. Auth settings (sign-in providers, redirect URLs, email templates) are project settings, not data: set them in the new project.

important

What can be lost: your app's and customers' writes after the newest restore point. Raddu's row log records the agent only, and says so when it recovers.

caution

Raddu sees the commands the agent runs, not what a program does inside itself. A Node script that calls a cloud SDK, a person in a dashboard, or an MCP server Raddu doesn't know can still delete things without a question. raddu recover works the same afterwards.

Check your knowledge

Answer every question correctly and the unit is marked as completed.

Your agent runs railway volume delete in Claude Code. What happens first?

The volume is gone. Where does raddu recover restore to?