Omnigraph
CLI

export

Stream a branch snapshot to JSONL on stdout.

export writes a graph snapshot to stdout as JSONL. One node or edge record per line, in the same format load and ingest consume. This is the canonical way to back up a graph, hand it off between environments, or run external tools against a stable point-in-time view.

Usage

omnigraph export <path> [--branch <name>] [--type <NodeType>] [--table <key>] [options]

Arguments

ArgumentRequiredDescription
pathyesGraph URI (local path or s3://); required unless resolved from --target / --config

Options

OptionRequiredDefaultDescription
--branchnomainBranch to export
--typenoRepeatable. Export only the named node / edge type. Omit to export all types.
--tablenoRepeatable. Export by raw table key (e.g. nodes/Person).
--targetnoNamed graph from omnigraph.yaml
--confignoPath to an omnigraph.yaml

The exporter streams: large graphs can be redirected straight to a file or pipe without loading the full dataset into memory.

Examples

Export an entire graph to a file:

omnigraph export ./graph.omni > backup.jsonl

Export a single node type:

omnigraph export ./graph.omni --type Person > people.jsonl

Export several types from a non-default branch:

omnigraph export ./graph.omni \
    --branch feature-x \
    --type Person \
    --type WorksAt \
    > snapshot.jsonl

Round-trip a graph to a new URI:

omnigraph export ./graph.omni > snapshot.jsonl
omnigraph init --schema ./schema.pg ./graph-restored.omni
omnigraph load ./graph-restored.omni --data snapshot.jsonl --mode overwrite

On this page