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

--experimental-metric-export enables shared Metric physical scans for Parquet. Enable experimental_metric_export = true on the frontend or standalone server and use an endpoint whose frontends all support and enable this option. 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. Completed chunks and the V2 snapshot/import format remain unchanged.

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.