Expand description
Storage backend migration: redb ↔ Persy.
Provides one-shot batch migration between BEAM’s two storage backends.
The translation is format-only: the inner Children data is byte-identical
between redb and Persy; only the wrapper struct ([NodeRecord]) differs.
§On-disk formats
redb: TableDefinition<&str, &[u8]> in the beam_nodes_v1 table.
Key is the node_id directly; value is postcard(Children) (no wrapper).
Persy: A segment named beam_nodes_v1 containing opaque records.
Each record is postcard(NodeRecord { node_id, children }).
§CLI
beam migrate --from <redb|persy> --to <redb|persy> \
--source <path> --target <path> \
[--batch-size 1000] [--force] [--dry-run]See the migration plan for the full design rationale.
Structs§
- Migrate
Opts - Migration options, typically parsed from CLI arguments.
- Migration
Record - A single graph node record in the canonical migration format.
- Migration
Report - Result of a completed migration, returned to the caller for reporting.
Enums§
- Backend
- Source/target backend selector.
- Migrate
Error - All migration error variants.
Functions§
- fjall_
key_ to_ node_ id - Decodes a fjall keyspace key back to a node_id string.
- persy_
to_ redb_ record - Translates a Persy record payload into a redb (node_id, value_bytes) pair.
- redb_
to_ fjall_ key - Encodes a node_id string as a fjall keyspace key.
- redb_
to_ persy_ payload - Translates a redb record (node_id + raw value bytes) into a Persy record payload.