Skip to main content

Module snapshot

Module snapshot 

Source
Expand description

Bundle per-node DB snapshots into a single uploadable artifact.

The per-node tarballs are produced by NetworkNode::snapshot_db (in the orchestrator crate). This module packs them — plus a JSON user_data blob — into a single outer bundle.tar.gz with a SnapshotManifest sidecar so consumers can verify checksums and discover what’s inside.

Layout inside the bundle:

<archive1>.tgz
<archive2>.tgz
...
manifest.json   // schema: SnapshotManifest

Consumer side is user-owned: the user untars the bundle and passes the inner .tgz paths to with_db_snapshot(...) on a NodeConfigBuilder.

Structs§

ArchiveEntry
Per-archive metadata inside a SnapshotManifest. This is similar to NodeSnapshot but using the filename instead of the path.
Bundle
Result of BundleBuilder::build.
BundleBuilder
Assembles a single bundle.tar.gz from one or more NodeSnapshots plus a JSON user_data blob.
Empty
Typestate marker: no archives added yet.
NonEmpty
Typestate marker: at least one archive has been added.
SnapshotManifest
Schema of manifest.json inside the bundle. Versioned — MANIFEST_SCHEMA_VERSION bumps are breaking changes.

Constants§

MANIFEST_SCHEMA_VERSION
Stable schema version of SnapshotManifest. Bump on breaking changes.

Functions§

untar_bundle
Helper function to untar the produced bundle into a destiantion path.