From 46d5aa0a09f347e8d63b39fa6ac1e47224c701ea Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 29 Jul 2019 12:49:15 +0200 Subject: [PATCH] src/bin/proxmox-backup-client.rs: add restore flag --allow-existing-dirs Not jet implemented ... --- src/bin/proxmox-backup-client.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/bin/proxmox-backup-client.rs b/src/bin/proxmox-backup-client.rs index 2fa5cb08..1b0133bf 100644 --- a/src/bin/proxmox-backup-client.rs +++ b/src/bin/proxmox-backup-client.rs @@ -641,6 +641,8 @@ fn restore( let verbose = param["verbose"].as_bool().unwrap_or(false); + let allow_existing_dirs = param["allow-existing-dirs"].as_bool().unwrap_or(false); + let archive_name = tools::required_string_param(¶m, "archive-name")?; let client = HttpClient::new(repo.host(), repo.user())?; @@ -737,6 +739,10 @@ fn restore( if let Some(target) = target { + if allow_existing_dirs { + unimplemented!(); + } + let feature_flags = pxar::CA_FORMAT_DEFAULT; let mut decoder = pxar::SequentialDecoder::new(&mut reader, feature_flags, |path| { if verbose { @@ -1429,6 +1435,9 @@ We do not extraxt '.pxar' archives when writing to stdandard output. "### )) + .optional( + "allow-existing-dirs", + BooleanSchema::new("Do not fail if directories already exists.").default(false)) .optional("repository", REPO_URL_SCHEMA.clone()) .optional("keyfile", StringSchema::new("Path to encryption key.")) .optional(