Expand description
Export V2 module.
This module provides the V2 implementation of database export functionality, featuring:
- JSON-based schema export (version-agnostic)
- Manifest-based snapshot management
- Support for multiple storage backends (S3, OSS, GCS, Azure Blob, local FS)
- Resume capability for interrupted exports
ยงExample
# Export schema only
greptime cli data export-v2 create \
--addr 127.0.0.1:4000 \
--to file:///tmp/snapshot \
--schema-only
# Export with time range
greptime cli data export-v2 create \
--addr 127.0.0.1:4000 \
--to s3://bucket/snapshots/prod-20250101 \
--start-time 2025-01-01T00:00:00Z \
--end-time 2025-01-31T23:59:59Z--pack-metric-data enables shared Metric physical scans for Parquet
and writes version-2 packed snapshots.
Enable experimental_metric_export = true on the frontend or standalone server
and use an endpoint whose frontends all support and enable this option.
Resume reads the layout from the existing manifest.
This requires the server packed-export capability; schema-only exports remain version 1.
The command checks the server capability before modifying the snapshot.
Each snapshot path belongs to one export task. Resume requires stable source
schemas/data and confirmation that the previous export and storage writes ended;
an HTTP timeout does not establish that. Only unfinished chunks are cleaned and
rerun. Resume retains the snapshot version/layout and completed chunks.
Re-exportsยง
pub use command::ExportV2Command;