aboutsummaryrefslogtreecommitdiff
path: root/src/garage/cli/structs.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-12-16 13:17:09 +0100
committerAlex Auvolat <alex@adnab.me>2022-01-04 12:46:13 +0100
commit4d30e62db456097563c574b9dfd22b138d700087 (patch)
tree00c6790eb7dad952c8e4796731a4ff6e7c3613b6 /src/garage/cli/structs.rs
parent0bbb6673e7ce703e470a3c2aad620ee5f009bc84 (diff)
downloadgarage-4d30e62db456097563c574b9dfd22b138d700087.tar.gz
garage-4d30e62db456097563c574b9dfd22b138d700087.zip
New buckets for 0.6.0: migration code and build files
Diffstat (limited to 'src/garage/cli/structs.rs')
-rw-r--r--src/garage/cli/structs.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/garage/cli/structs.rs b/src/garage/cli/structs.rs
index 1905069e..bd7abc8e 100644
--- a/src/garage/cli/structs.rs
+++ b/src/garage/cli/structs.rs
@@ -28,6 +28,11 @@ pub enum Command {
#[structopt(name = "key")]
Key(KeyOperation),
+ /// Run migrations from previous Garage version
+ /// (DO NOT USE WITHOUT READING FULL DOCUMENTATION)
+ #[structopt(name = "migrate")]
+ Migrate(MigrateOpt),
+
/// Start repair of node data
#[structopt(name = "repair")]
Repair(RepairOpt),
@@ -320,6 +325,23 @@ pub struct KeyImportOpt {
}
#[derive(Serialize, Deserialize, StructOpt, Debug, Clone)]
+pub struct MigrateOpt {
+ /// Confirm the launch of the migrate operation
+ #[structopt(long = "yes")]
+ pub yes: bool,
+
+ #[structopt(subcommand)]
+ pub what: MigrateWhat,
+}
+
+#[derive(Serialize, Deserialize, StructOpt, Debug, Eq, PartialEq, Clone)]
+pub enum MigrateWhat {
+ /// Migrate buckets and permissions from v0.5.0
+ #[structopt(name = "buckets050")]
+ Buckets050,
+}
+
+#[derive(Serialize, Deserialize, StructOpt, Debug, Clone)]
pub struct RepairOpt {
/// Launch repair operation on all nodes
#[structopt(short = "a", long = "all-nodes")]