Skip to content
Projects

Export

Download a project's database as a portable SQL dump — or export a whole organization — to restore into a self-hosted instance.

Export gives you a portable copy of your data you can restore into a self-hosted backlex instance. Following the same model as Supabase and Directus, the unit of export is a SQL dump (schema + data) per project — not an opaque archive.

From the project’s Settings → Danger zone → Export project, or via the API (owner, admin, or developer). The endpoint streams the SQL dump (schema and data) directly as a file download:

Terminal window
curl -OJ https://cloud.backlex.com/api/org/<org>/projects/<project>/export \
-H "Authorization: Bearer pak_..."
# → saves <project>.sql

Restore the dump into the database of a self-hosted instance.

Settings → Danger zone → Export organization, or via the API (owner or admin). This lists the org’s non-deleted projects; download each one from its project export endpoint:

Terminal window
curl -X POST https://cloud.backlex.com/api/org/<org>/export \
-H "Authorization: Bearer pak_..."
# → { "projects": [ { "slug", "filename" }, … ], "exportedAt": "2026-…" }

The dashboard downloads each project’s .sql for you. There’s no single bundled archive — one portable SQL file per project, mirroring how Supabase and Directus migrate.

  1. Stand up a self-hosted backlex instance (its own D1/SQLite database).
  2. Load each .sql dump into the corresponding instance’s database.
  3. Re-create any API keys — auth secrets differ between cloud and self-host, so existing tokens won’t carry over and users re-authenticate.

See also Backups for point-in-time snapshots within the platform (a different tool — restore in place, not migrate out).