Download everything in a project as one archive (database, auth users, stored files, Edge Functions, settings) on every plan, and import it into another project.
Your data is yours. On every plan, one click gives you a single archive with everything in a project, in open formats that work without StitchDB. The same archive imports into another StitchDB project (or back into this one).
#Export a project
In Studio open Database › Export & import and choose Export project. The archive is built on your project's server, in a few minutes for most projects, then Download appears. Each export is kept 24 hours; Copy link gives a link that works without signing in until then, for curl or a server:
curl -o project.tar "https://<ref>.<your project domain>/export/v1/download/<id>?token=<token>"
sha256sum project.tar # compare with the checksum shown in StudioInterrupted downloads resume (the link supports ranges, e.g. curl -C -). Up to 5 exports a day per project; making one does not lock your project.
#What is in the archive
| Path | Contents |
|---|---|
database.dump | The whole Postgres database in pg_dump custom format: schemas, tables and data, views, functions, triggers, policies, auth users and sessions, storage metadata, cron jobs, queues. |
auth/users.ndjson, auth/identities.ndjson | Auth users and their sign-in identities, one JSON object per line. Passwords stay hashed with bcrypt, so users keep signing in with the same password wherever the hashes are imported. One-time tokens are left out. |
storage/ | Your stored files, by bucket and path. |
functions/<name>/ | The source of each Edge Function, with function.json (entrypoint, import map, JWT check). |
settings/ | Auth settings and e-mail templates, rate limit rules, database webhooks, project details. |
manifest.json, README.md | What is in the archive, and how to restore it. |
Secrets are never exported: OAuth provider keys, your SMTP password, webhook signing secrets and Edge Function secrets (their names are listed in functions/secrets.json). Set them again where you import.
#Restore anywhere
tar -xf project.tar
createdb mydb
pg_restore --no-owner --no-acl -d mydb database.dumpAny Postgres 15 or newer works. Grants and policies refer to the roles your project used (anon, authenticated, service_role and the project's own roles); with --no-acl they are skipped, or create roles with those names first to keep them.
#Import into a project
- Open Database › Export & import in the project to import into and choose Choose archive under Import. The archive uploads straight to that project's server and is checked.
- Choose whether to deploy its Edge Functions and apply its Auth settings and rate limits.
- The project owner types the project name and starts the import. The database is restored into a new database first and swapped in at the end, so a failed import leaves the project as it was; connections pause for a moment during the swap.
An import replaces everything in the project's database and its stored files. When backups are connected, a backup of the current state is made first and can be restored from Backups. Roles of the exported project are mapped to the importing project's roles, so policies and grants keep working. The importing project's API keys and URL stay the same: update the keys in your app if it used the other project.
The archive can be as large as the importing project's database and file storage limits allow (plus some room). Uploads are kept 24 hours until imported.
#Who can do what
| Action | Role |
|---|---|
| See and download exports | Owner, admin |
| Make an export, upload an archive | Owner, admin |
| Start an import | Owner |