Skip to content
Projects

Backups

Point-in-time snapshots of a project database via D1 Time Travel — automatic and manual, with one-click restore.

Backups are project-scoped snapshots of the instance database. On D1 they’re backed by Time Travel, so a snapshot is a bookmark you can restore to without copying data around.

  • auto — created on a schedule by the platform; old ones are garbage-collected past their retention window.
  • manual — taken on demand (e.g. before a risky migration). Created by an admin.

From the project’s Backups tab, or via the API:

Terminal window
curl -X POST https://cloud.backlex.com/api/org/<org>/projects/<project>/backups \
-H "Authorization: Bearer pak_..." \
-H "Content-Type: application/json" \
-d '{"kind":"manual"}'

Restoring rolls the project database to the snapshot. It’s a destructive operation on the live data — take a fresh manual backup first if you might want to come back.

Terminal window
curl -X POST \
https://cloud.backlex.com/api/org/<org>/projects/<project>/backups/<id>/restore \
-H "Authorization: Bearer pak_..."

Creating and restoring backups requires the admin role and is written to the audit log.

Everything above is a platform snapshot: the control plane takes a D1 Time Travel bookmark of the whole database, and restoring rolls the whole database back to it. It is an infrastructure operation, and it is the one this page is about.

Your project’s own admin — the one running inside the instance — has a separate backup feature that works on your data rather than your database:

platform snapshot (here)instance backup (project admin)
granularitythe entire databasechosen tables, or all of them
restorerolls everything back to a point in timewrites rows back, with a mode
modesreplace (default), or overwrite: update existing rows and insert missing ones, leaving everything else alone
narrowingonlyTables restores just the tables you name
stored asa D1 bookmark, no data copieda JSONL dump
whereyour project’s Backups tab in the cloud panelyour project’s own admin

They compose rather than compete: take a platform snapshot before anything drastic, and use an instance backup when you want a table back without rewinding the rest of the workspace.

Three classes of row are deliberately not restored by an instance backup, and it reports them as keptAdditive rather than silently skipping them: tables with no single-column id (a restore could not address the rows), users rows (identity is global to the instance — restoring one workspace’s users would change what every other workspace that person belongs to sees), and instance-global rows (tenant_id IS NULL), so a workspace admin cannot reach instance-wide configuration from an operation scoped to their own workspace.

Dropping a collection or a field in your project’s admin captures a pre-drop backup first, in the same format and the same list, before it destroys anything. That covers the REST route, the SDK, the CLI, MCP and GraphQL, because the guard lives in the schema service rather than in one handler.

A confirmation is required only when the operation would actually destroy data — dropping an empty scaffolding column stays a one-step operation, so CI and template automation are not broken by the guard. ?dryRun=1 reports what would be lost without doing it.