Export and restore walkthrough
This walkthrough is a founder-produced proof asset for beachhead users who want to verify Marrow’s portability claim before trusting it with real data. It walks export → bundle inspection → restore, and links to the authoritative restore guarantee scope table.
What this demo covers (v4)
Section titled “What this demo covers (v4)”| In the bundle | Not in v4 (see scope table) |
|---|---|
| Node tree, revisions, attachments | Comments |
node_properties in manifest.json | Share links |
links.json backlink index | Folder view definitions |
Trash state (with --include-trash) | Stars, Inbox, watches (user-scoped) |
Full scope: What round-trips today · Export bundle format.
Prerequisites
Section titled “Prerequisites”- Marrow running locally (Quickstart)
- A workspace with at least one page and an attachment (optional but recommended)
jqinstalled (brew install jqon macOS)
1. Export a workspace
Section titled “1. Export a workspace”From the api/ directory with venv active and DATABASE_URL pointing at your dev database:
cd apisource .venv/bin/activatemarrow export --workspace <workspace-slug> --output /tmp/marrow-demo.zipReplace <workspace-slug> with the slug shown in the UI or returned by GET /api/workspaces/. The CLI writes a timestamped zip; --output sets the path.
To include soft-deleted nodes (trash):
marrow export --workspace <workspace-slug> --include-trash --output /tmp/marrow-demo-with-trash.zip2. Inspect the bundle
Section titled “2. Inspect the bundle”List top-level entries:
unzip -l /tmp/marrow-demo.zipYou should see:
manifest.jsonnodes/revisions/ # omitted in --slim exportsassets/links.jsonRead the manifest (schema version, node tree, properties):
unzip -p /tmp/marrow-demo.zip manifest.json | jq '.schema_version, .workspace, (.nodes | length), (.node_properties | length)'Peek at a page’s canonical JSON (BlockNote) and human Markdown:
# Pick a page node id from manifest.json → .nodes[]unzip -p /tmp/marrow-demo.zip "nodes/<page-node-id>.json" | jq '.[0].type'unzip -p /tmp/marrow-demo.zip "nodes/<page-node-id>.md" | headInspect internal links:
unzip -p /tmp/marrow-demo.zip links.json | jq '.internal_links | length'Attachments land under assets/ named by attachment ID. Folder nodes appear only in manifest.json — they have no files under nodes/.
See Export bundle format for the full layout reference.
3. Restore into a fresh database
Section titled “3. Restore into a fresh database”Restore proves the bundle is self-contained. Use a disposable database so you do not overwrite live data.
Option A — wipe dev Postgres (simplest)
Section titled “Option A — wipe dev Postgres (simplest)”# Stop API first if it holds connections.# `-v` drops the Postgres volume so the database is genuinely empty —# without it the old rows survive and restore collides on existing slugs.docker compose down -vdocker compose up -dcd api && alembic upgrade head
marrow restore /tmp/marrow-demo.zipThe CLI prints the restored workspace slug. Open the web app and confirm pages, folders, attachments, and properties match.
Option B — separate database URL
Section titled “Option B — separate database URL”createdb marrow_restore_test # requires local Postgres clientDATABASE_URL=postgresql://marrow:marrow@localhost:5433/marrow_restore_test \ alembic upgrade headDATABASE_URL=postgresql://marrow:marrow@localhost:5433/marrow_restore_test \ marrow restore /tmp/marrow-demo.zip4. Verify parity
Section titled “4. Verify parity”After restore, spot-check:
- Tree shape — folders and pages in the same hierarchy; positions preserved.
- Page content — open a JSON-format page; BlockNote content should match pre-export.
- Properties — folder schema and page values on inherited properties.
- Backlinks — pages that linked to each other still show backlinks in the UI.
- Attachments — download an attachment from a restored page.
If anything differs, that is a critical bug against the restore guarantee — please file an issue.
5. What is intentionally excluded
Section titled “5. What is intentionally excluded”Do not expect these to survive export→restore in v4:
- Comments on pages — planned for bundle v5
- Share links — planned for bundle v5
- Folder view definitions (table/board/list configs) — planned for bundle v5
- Stars, Inbox notifications, watches — user-scoped; never exported by design
Using those features in the UI is fine; they simply are not in the portable bundle yet. See the scope table.
Next steps
Section titled “Next steps”- Restore guarantee — architectural foundation and CI enforcement
- Docker Compose — run the same flow on a production-style stack
- Environment variables — API-key auth for single-user deployments