extern crate proxmox_backup;
-use failure::*;
+use anyhow::{format_err, Error};
use proxmox::{sortable, identity};
use proxmox::api::{ApiHandler, ApiMethod, RpcEnvironment};
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)
.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);
}