Recover Deleted Databases
Restore databases and groups for up to five days after deletion.
Turso Cloud keeps deleted databases and groups recoverable for up to five days after deletion. Restoring brings the database back exactly as it was at the moment it was deleted — same name, same data. This protects you against accidents, whether the delete came from a teammate, a script, or an AI agent with too much enthusiasm.
Recovery is available on all paid plans at no additional cost.
This is different from Point-in-Time Recovery (PITR). PITR restores an existing database to an earlier point in time, but it cannot bring back a database that was deleted. Recovery brings back a deleted database at the moment it was deleted.
Requirements
- A paid plan. Databases deleted while the organization was on a paid plan can be restored.
- Admin or owner access to the organization.
- Recovery enabled for the organization (the Allow restore toggle — see below).
Restore from the dashboard
- Open the Restore page in the Turso dashboard.
- Find the database under Recently deleted — you can search by name, ID, hostname, or group.
- Click Restore.
Deleted groups appear in their own section on the same page. Restoring a group also attempts to restore the databases that were deleted along with it.
Restore with the Platform API
List the databases deleted within the last five days, then restore by the database’s UUID:
curl -L 'https://api.turso.tech/v3/organizations/{organizationId}/databases?deleted=true' \
-H 'Authorization: Bearer TOKEN'
curl -L -X POST 'https://api.turso.tech/v3/organizations/{organizationId}/databases/{databaseId}/restore' \
-H 'Authorization: Bearer TOKEN'
curl -L 'https://api.turso.tech/v3/organizations/{organizationId}/deleted-groups' \
-H 'Authorization: Bearer TOKEN'
curl -L -X POST 'https://api.turso.tech/v3/organizations/{organizationId}/groups/{groupId}/restore' \
-H 'Authorization: Bearer TOKEN'
These endpoints identify everything by UUID rather than name:
{organizationId} is the id field from
Retrieve Organization, and the
database and group UUIDs come from the deleted listings. To restore under a
different name (for example, when a new database already uses the old one),
pass a JSON body: { "name": "my-restored-database" }.
Refer to the API reference for all parameters and response fields:
Restore with an AI agent
The Turso MCP server exposes recovery to AI agents, so an agent that deleted a database by mistake can bring it back in the same session:
| Tool | Description |
|---|---|
list_deleted_databases |
List databases deleted within the last five days. Returns the UUID needed to restore. |
restore_database |
Restore a deleted database by UUID, optionally under a new name. |
list_deleted_groups |
List groups deleted within the last five days, including empty groups. |
restore_group |
Restore a deleted group and the databases that were deleted with it. |
Restoring groups
Destroying a group deletes all of its databases. Restoring the group brings the
group back and attempts to restore those databases as well. If some databases fail
to restore, the group still becomes active — you can retry the failed databases
individually with restore_database.
Disabling recovery
Some organizations need deleted to mean deleted. Admins and owners can turn
recovery off for the whole organization with the Allow restore toggle on the
dashboard’s Restore page, through the API, or through the MCP server
(set_organization_restore_enabled):
curl -L -X PATCH 'https://api.turso.tech/v1/organizations/{organizationSlug}' \
-H 'Authorization: Bearer TOKEN' \
-H 'Content-Type: application/json' \
-d '{ "restore_enabled": false }'
The current state is returned as restore_enabled by
Retrieve Organization.
While recovery is disabled, deleted databases and groups still appear in the deleted listings, but restore attempts fail until an admin or owner re-enables recovery.
Things to know
- The recovery window is five days from deletion. After that, the database is gone for good.
- Restores are identified by the database’s UUID, not its name — names can be reused. If a new database already exists with the old name, restore the deleted one under a new name.
- The restored database contains everything committed up to the moment of deletion. To rewind further back in time, follow up with Point-in-Time Recovery.
- Recovery requires regional support: appearing in the deleted listing does not guarantee the database can be recovered.
- To prevent deletion in the first place, enable delete protection on the database or group — a protected database cannot be deleted until protection is turned off.