SHADE is young: 0.1.0-next.2 is a pre-release, and 0.1.0 isn't out yet.

SHADE
People, security and privacy

Exporting an instance

An admin can export the whole instance as one .tar file of JSON and NDJSON: every collection's entries, the media library with its originals, the team, users, the settings and each module's data (the forms module's submissions too). Any program can read it, without SHADE. It is how a client takes their content to another system, and why a client can always leave (decision 0001 point 7).

It is not a backup. An instance comes back from its encrypted backup, which only SHADE can restore; the export is for reading, not for restoring. Importing an export into another instance is not built yet (see the roadmap).

An operator can also export only the content and settings, without people or secrets, from the console: export --content. That file goes to a developer's machine or another instance, where import --content loads it.

What users can do

  • Admins export the instance from Settings, in the Export your setup card, after signing in again with their password and a two-factor code or a passkey. The browser saves the file as it comes in.
  • Every active admin gets an email when someone exports the instance, with its size and what it holds. Email must be set up first: until then the export is refused.
  • Everyone else cannot export the instance or see the card.

Who may do it

ActionPermissionRoles
Export the instanceinstance.exportadmin, after signing in again (never a custom role)

instance.export can't be given to a custom role, an automation token, a module or the AI over MCP. The routes take a signed-in session only, never an API token.

In the admin

Settings → Export your setup (admins only): what the file holds, that it is not a backup, and Export.

The dialog says plainly that the file is not encrypted and holds personal data: names and email addresses of the team and of users, and what visitors sent through forms. Email must be set up first; until then the dialog says so and links to the Email screen. It asks for the password and a two-factor code (or a passkey); an admin with neither is sent to their account page first. Then the browser saves one file, <address>-export-<day>.tar ("The export has started"). A large media library takes a while.

Windows and macOS open a .tar file without extra software; on Linux, tar -xf unpacks it.

What is in the file

PathWhat it holds
README.mdWhat each file holds, and what is left out
collections/<collection>.schema.jsonThe collection's fields, as it declares them
collections/<collection>.ndjsonOne entry a line (below)
media/media.ndjsonOne media item a line: id, filename, type, size, width, height, alt text per language, created
media/files/<id>/<filename>Each original; the smaller versions are left out, they can be made again
team.ndjsonTeam members: name, email address, role, custom role, active, created, last sign-in
users.ndjsonUsers: name, email address, verified, account roles, created, last seen
settings.jsonThe site's settings, and those of email and accounts, without secrets; and the wording admins gave SHADE's emails (emailTemplates, see Email)
modules/<plugin>/Each installed module's data (below)
manifest.jsonLast in the file: the format (shade-export/1), SHADE's version, the instance's address, its languages, when it was made, the installed modules, and every file with its size, its rows and its SHA-256

NDJSON is JSON with one value a line. Every time is in UTC. Ids are kept, so relations and media in fields point at entries and media by id.

An entry's line holds its id, status, createdAt, updatedAt, publishedAt, its published data in the default language (data), each other language's translated text (translations), and its unpublished changes (draft) only when there are any. Only the current versions: the history of entries stays in the backup.

A module's folder holds its settings (without secrets), its own tables as NDJSON and what SHADE keeps for it (its stored data, private files and account roles), unless the module gives a shape of its own (orders as CSV, say). Its collections are under collections/ with the rest.

A media item whose original is missing from storage stays in media/media.ndjson and is listed under missingMedia in the manifest, without a file.

Rules and limits

  • Never in the file: passwords and their hashes, sessions, passkeys, two-factor secrets, API and program tokens, preview tokens, webhook signing secrets, settings marked secret, the visitor IP hashes kept with modules' data such as form submissions, the server's keys and environment, the audit log, the error log, the history of entries and the smaller versions of media. What each kind holds is a fixed list: a column added later is out until someone adds it.
  • Signing in again: the password and a second factor give a ticket for five minutes, for that session, used once. Five tries in a quarter of an hour.
  • One at a time, five a day. An export that stops part way counts.
  • Seen by every admin: each export is in the audit log (data.taken, kind instance, with its size, its parts and the IP address as a keyed hash) and emailed to every active admin before the file starts.
  • One moment in time: everything is read from one snapshot of the database, so the files agree with each other. A file that changes while it is written (an original replaced in storage, say) ends the download with an error rather than leave a file that looks complete.
  • Checking it: every file's SHA-256 is in manifest.json, so anyone can check that nothing was changed or cut off.

For developers

  • Decision 0007 point 11 (Part 1, As built).
  • Code: shade/features/instance-export/ and its README.md. The export goes the one way every copy of an instance's data leaves it, with the backup download and the audit log export (decision 0007 point 10): API GET /api/instance/data/instance/factors, POST /api/instance/data/instance/options, POST /api/instance/data/instance/confirm and POST /api/instance/data/instance (a form post with the ticket; the .tar with its exact size).
  • A trusted module can give its own shape with the manifest part export(ctx, write); see the SDK reference. It runs in a read-only snapshot, twice (measured, then streamed), so it must write the same files both times.