Skip to main content

Module export_v2

Module export_v2 

Source
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. Use an endpoint whose frontends all support packed export. 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;

Modulesยง

chunker ๐Ÿ”’
command ๐Ÿ”’
Export V2 CLI commands.
coordinator ๐Ÿ”’
data ๐Ÿ”’
error
extractor
Schema extraction from information_schema.
manifest
Manifest data structures for Export/Import V2.
schema
Minimal schema index structures for Export/Import V2.