]> git.proxmox.com Git - proxmox-backup.git/commitdiff
client: rename --backup-ns to --ns in backup command
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 12 May 2022 08:43:56 +0000 (10:43 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 12 May 2022 08:43:56 +0000 (10:43 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
proxmox-backup-client/src/main.rs

index a186da6041674c7ca65ba7a02b0289ce7bda02e7..8e9dd37f80a4c8767b8df4956ca438441810fd84 100644 (file)
@@ -606,7 +606,7 @@ fn spawn_catalog_upload(
                optional: true,
                default: false,
            },
-           "backup-ns": {
+           "ns": {
                schema: BACKUP_NAMESPACE_SCHEMA,
                optional: true,
            },
@@ -703,13 +703,7 @@ async fn create_backup(
         .as_str()
         .unwrap_or(proxmox_sys::nodename());
 
-    let backup_ns: BackupNamespace = match param.get("backup-ns") {
-        Some(ns) => ns
-            .as_str()
-            .ok_or_else(|| format_err!("bad namespace {:?}", ns))?
-            .parse()?,
-        None => BackupNamespace::root(),
-    };
+    let backup_ns = optional_ns_param(&param)?;
 
     let backup_type: BackupType = param["backup-type"].as_str().unwrap_or("host").parse()?;