mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-16 10:12:58 +00:00
feat: add CLI tool to export metadata (#6150)
* chore: add tool to export db meta * chore: add meta restore command * chore: fmt code * chore: remove useless error * chore: support key prefix * chore: add clean check for meta restore * chore: add more log for meta restore * chore: resolve s3 and local file root in command meta-snapshot * chore: remove the pg mysql features from the build script as they are already in the default feature * chore: fix by pr comment
This commit is contained in:
@@ -13,7 +13,10 @@
|
||||
// limitations under the License.
|
||||
|
||||
use clap::Parser;
|
||||
use cli::{BenchTableMetadataCommand, ExportCommand, ImportCommand, Tool};
|
||||
use cli::{
|
||||
BenchTableMetadataCommand, ExportCommand, ImportCommand, MetaRestoreCommand,
|
||||
MetaSnapshotCommand, Tool,
|
||||
};
|
||||
use common_error::ext::BoxedError;
|
||||
|
||||
#[derive(Parser)]
|
||||
@@ -22,6 +25,8 @@ pub enum SubCommand {
|
||||
Bench(BenchTableMetadataCommand),
|
||||
Export(ExportCommand),
|
||||
Import(ImportCommand),
|
||||
MetaSnapshot(MetaSnapshotCommand),
|
||||
MetaRestore(MetaRestoreCommand),
|
||||
}
|
||||
|
||||
impl SubCommand {
|
||||
@@ -31,6 +36,8 @@ impl SubCommand {
|
||||
SubCommand::Bench(cmd) => cmd.build().await,
|
||||
SubCommand::Export(cmd) => cmd.build().await,
|
||||
SubCommand::Import(cmd) => cmd.build().await,
|
||||
SubCommand::MetaSnapshot(cmd) => cmd.build().await,
|
||||
SubCommand::MetaRestore(cmd) => cmd.build().await,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user