cli/data/export_v2.rs
1// Copyright 2023 Greptime Team
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! Export V2 module.
16//!
17//! This module provides the V2 implementation of database export functionality,
18//! featuring:
19//! - JSON-based schema export (version-agnostic)
20//! - Manifest-based snapshot management
21//! - Support for multiple storage backends (S3, OSS, GCS, Azure Blob, local FS)
22//! - Resume capability for interrupted exports
23//!
24//! # Example
25//!
26//! ```bash
27//! # Export schema only
28//! greptime cli data export-v2 create \
29//! --addr 127.0.0.1:4000 \
30//! --to file:///tmp/snapshot \
31//! --schema-only
32//!
33//! # Export with time range
34//! greptime cli data export-v2 create \
35//! --addr 127.0.0.1:4000 \
36//! --to s3://bucket/snapshots/prod-20250101 \
37//! --start-time 2025-01-01T00:00:00Z \
38//! --end-time 2025-01-31T23:59:59Z
39//! ```
40
41mod chunker;
42mod command;
43mod coordinator;
44mod data;
45pub mod error;
46pub mod extractor;
47pub mod manifest;
48pub mod schema;
49pub use command::ExportV2Command;
50
51#[cfg(test)]
52mod tests;