Import and export
Move your data as JSON, Markdown, YAML, TOML, PDF or a SQLite snapshot. The CLI and the dashboard support the same six formats.
| Format | Use it for |
|---|---|
json, yaml, toml | Interchange and scripting |
md | Readable files that also embed a machine-readable Lighthouse payload |
pdf | A human-readable report |
db | A consistent SQLite snapshot |
Export
$ lighthouse export --format yaml --output lighthouse-export.yaml$ lighthouse export --format db --output lighthouse-snapshot.dbA .db export is a consistent snapshot made after a WAL checkpoint. It is safe to put in a synced folder once it has finished writing.
Backup and integrity
$ lighthouse backup$ lighthouse doctorbackup copies the database. doctor checks the schema, the change feed and the search index. Upgrading to v0.9.0 also writes a <db>.bak-v1-<timestamp> copy before it migrates the database.
Import
$ lighthouse import --format yaml --file lighthouse-export.yaml$ lighthouse import --format db --file lighthouse-snapshot.dbHow imports merge
- Portable formats merge records and skip duplicate IDs and memory keys.
- A
.dbimport opens the upload read-only and merges artifacts and active memory. It does not replace the live database and does not import its audit log. - A PDF import keeps a bounded copy of the raw file as an attachment. It does not extract text.
- Imported content stays untrusted data and is escaped when rendered.
A sample export
version: 1artifacts: - id: dee8fc903d60e452fa88d52e5d10cccd title: Choose SQLite for the canonical store project: harbor-api agent: claude kind: decision fields: area: storage confidence: 0.9