Summary
Roadmap item (named in the closed backup-docs issue #42 as a future step: "a small export <file.json> command mirroring import" — the docs half shipped in v0.2.0; the command did not). The CLI can bulk-load (import) but cannot dump, which reads as a one-way door.
Scope
libredb export <path> <file.json>: the kv layer as a JSON object of string values — the exact shape import consumes, so export -> import round-trips.
- Opens through
readonlyFileSystem() like every read command (no lock, no writes); pinned by the same never-mutates test.
- Decide the story for non-kv namespaces honestly: v1 exports the kv layer only (documents/tables are reachable via their prefixes as raw entries — state this in the doc), or add per-lens export later.
- Well-formedness: values are already validated on write since v0.2.0; export must not re-introduce lone surrogates (JSON.stringify handles escaping).
Acceptance criteria
Summary
Roadmap item (named in the closed backup-docs issue #42 as a future step: "a small export <file.json> command mirroring import" — the docs half shipped in v0.2.0; the command did not). The CLI can bulk-load (
import) but cannot dump, which reads as a one-way door.Scope
libredb export <path> <file.json>: the kv layer as a JSON object of string values — the exact shapeimportconsumes, so export -> import round-trips.readonlyFileSystem()like every read command (no lock, no writes); pinned by the same never-mutates test.Acceptance criteria