DAL: implement basic snapshot export feature
What
Add a basic datadir export mecanism in DAL node.
Why
Extract/backup data from a node, and use it with another one
How
Read values that need to be exported and write them in the datadir you are exporting into.
Manually testing the MR
SYNOPSIS
octez-dal-node snapshot export [--data-dir=DIR]
[--max-published-level=INT] [--min-published-level=INT] [OPTION]… FILE
DESCRIPTION
Export DAL node data to a snapshot file.
OPTIONS
-d DIR, --data-dir=DIR
The directory where the Octez DAL node will store all its data.
Parent directories are created if necessary.
--max-published-level=INT
Maximum published level to include in the snapshot.
--min-published-level=INT
Minimum published level to include in the snapshot.
FILE (required)
Path to the snapshot file to export.
./octez-dal-node snapshot export --data-dir /tmp/data-dir /tmp/export
# Have a look at what is inside /tmp/export
./octez-dal-node run --data-dir /tmp/export
# Query some fresh data (new since the node started) and some old data (coming from the export)
# Play with --max-published-level and --min-published-level and check that excluded data are not exported
Summary by CodeRabbit
Release Notes
-
New Features
- Added snapshot export functionality to export DAL node store data, including slots, shards, and associated metadata
- Supports optional filtering by publication level range for selective data export
-
Refactor
- Updated internal data storage to remove status field from skip-list cells
- Enhanced store initialization with optional read-only mode support
Edited by CodeRabbit