]> git.proxmox.com Git - proxmox-backup.git/blobdiff - src/bin/pxar.rs
src/config/network.rs: make it compatible with pve
[proxmox-backup.git] / src / bin / pxar.rs
index a5b5e68287f811ef55ece3a334ee1903c4d1cfef..5d1eb2e63c2274d3b36c262212939f2364999296 100644 (file)
@@ -1,6 +1,6 @@
 extern crate proxmox_backup;
 
-use failure::*;
+use anyhow::{format_err, Error};
 
 use proxmox::{sortable, identity};
 use proxmox::api::{ApiHandler, ApiMethod, RpcEnvironment};
@@ -499,12 +499,12 @@ fn main() {
 
     let cmd_def = CliCommandMap::new()
         .insert("create", CliCommand::new(&API_METHOD_CREATE_ARCHIVE)
-            .arg_param(&["archive", "source", "exclude"])
+            .arg_param(&["archive", "source"])
             .completion_cb("archive", tools::complete_file_name)
             .completion_cb("source", tools::complete_file_name)
         )
         .insert("extract", CliCommand::new(&API_METHOD_EXTRACT_ARCHIVE)
-            .arg_param(&["archive", "pattern"])
+            .arg_param(&["archive", "target"])
             .completion_cb("archive", tools::complete_file_name)
             .completion_cb("target", tools::complete_file_name)
             .completion_cb("files-from", tools::complete_file_name)
@@ -519,5 +519,6 @@ fn main() {
             .completion_cb("archive", tools::complete_file_name)
         );
 
-    proxmox_backup::tools::runtime::main(run_cli_command(cmd_def));
+    let rpcenv = CliEnvironment::new();
+    run_cli_command(cmd_def, rpcenv, None);
 }