From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with UTF8SMTPS id 4021279BDB for ; Wed, 5 May 2021 14:50:08 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with UTF8SMTP id 0C76E16176 for ; Wed, 5 May 2021 14:50:08 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with UTF8SMTPS id 8CE2016167 for ; Wed, 5 May 2021 14:50:07 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with UTF8SMTP id 668A241F52; Wed, 5 May 2021 14:50:07 +0200 (CEST) Message-ID: <78d214a7-5c23-cb09-3abb-fdd7d64b0abf@proxmox.com> Date: Wed, 5 May 2021 14:50:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:89.0) Gecko/20100101 Thunderbird/89.0 Content-Language: en-US To: Thomas Lamprecht , Proxmox Backup Server development discussion References: <20210505100918.506-1-d.csapak@proxmox.com> <20210505100918.506-8-d.csapak@proxmox.com> <42acd90e-4a3f-e43b-b670-845ff1a77173@proxmox.com> From: Dominik Csapak In-Reply-To: <42acd90e-4a3f-e43b-b670-845ff1a77173@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.021 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.001 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox-tape.rs] Subject: Re: [pbs-devel] [PATCH proxmox-backup v2 7/8] bin/proxmox-tape: add restore-single command to proxmox-tape X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2021 12:50:08 -0000 On 5/5/21 13:04, Thomas Lamprecht wrote: > On 05.05.21 12:09, Dominik Csapak wrote: >> Signed-off-by: Dominik Csapak >> --- >> src/bin/proxmox-tape.rs | 62 +++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 62 insertions(+) >> >> diff --git a/src/bin/proxmox-tape.rs b/src/bin/proxmox-tape.rs >> index e18f334c..3d5d0cf3 100644 >> --- a/src/bin/proxmox-tape.rs >> +++ b/src/bin/proxmox-tape.rs >> @@ -868,6 +868,61 @@ async fn backup(mut param: Value) -> Result<(), Error> { >> Ok(()) >> } >> >> +#[api( >> + input: { >> + properties: { >> + store: { >> + schema: DATASTORE_MAP_LIST_SCHEMA, >> + }, >> + drive: { >> + schema: DRIVE_NAME_SCHEMA, >> + optional: true, >> + }, >> + "media-set": { >> + description: "Media set UUID.", >> + type: String, >> + }, >> + "snapshots": { >> + description: "Comma-separated list of snapshots.", >> + type: Array, >> + items: { >> + type: String, >> + description: "A single snapshot'," >> + }, >> + }, > > same here, and if we'd really like to add a extra command for restoring not all but > a list of snapshots I'd at least make snapshots a fixed "take all" parameter, e.g.: > > proxmox-tape restore-snapshots --store bar --media-set foo vm/100/... ct/101/... > > Or allow passing it multiple times for accumulation, as those can be better > tab-completed which would be really helpful compared to typing some date in. > (those pasting it in would not loose any benefit). this does that already (the text is wrong) but yes have it that way and optional makes sense, just gotta write a completion helper (since we need the source store per snapshot too) > > But as said, above is only for the case where we really want a separate command, > IMO this would fit fine into a single restore command... > yes thanks