From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup v4 4/6] bin/proxmox-tape: add optional snapshots to restore command
Date: Mon, 10 May 2021 11:27:58 +0200 [thread overview]
Message-ID: <20210510092800.17956-5-d.csapak@proxmox.com> (raw)
In-Reply-To: <20210510092800.17956-1-d.csapak@proxmox.com>
and add the appropriate completion helper
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
src/bin/proxmox-tape.rs | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/bin/proxmox-tape.rs b/src/bin/proxmox-tape.rs
index e18f334c..46bd4ecc 100644
--- a/src/bin/proxmox-tape.rs
+++ b/src/bin/proxmox-tape.rs
@@ -34,6 +34,7 @@ use proxmox_backup::{
MEDIA_LABEL_SCHEMA,
MEDIA_POOL_NAME_SCHEMA,
Userid,
+ TAPE_RESTORE_SNAPSHOT_SCHEMA,
},
},
config::{
@@ -51,6 +52,7 @@ use proxmox_backup::{
},
complete_media_label_text,
complete_media_set_uuid,
+ complete_media_set_snapshots,
file_formats::{
PROXMOX_BACKUP_CONTENT_HEADER_MAGIC_1_0,
MediaContentHeader,
@@ -886,6 +888,14 @@ async fn backup(mut param: Value) -> Result<(), Error> {
type: Userid,
optional: true,
},
+ "snapshots": {
+ description: "List of snapshots.",
+ type: Array,
+ optional: true,
+ items: {
+ schema: TAPE_RESTORE_SNAPSHOT_SCHEMA,
+ },
+ },
owner: {
type: Authid,
optional: true,
@@ -977,9 +987,10 @@ fn main() {
.insert(
"restore",
CliCommand::new(&API_METHOD_RESTORE)
- .arg_param(&["media-set", "store"])
+ .arg_param(&["media-set", "store", "snapshots"])
.completion_cb("store", complete_datastore_name)
.completion_cb("media-set", complete_media_set_uuid)
+ .completion_cb("snapshots", complete_media_set_snapshots)
)
.insert(
"barcode-label",
--
2.20.1
next prev parent reply other threads:[~2021-05-10 9:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 9:27 [pbs-devel] [PATCH proxmox-backup v4 0/6] tape: single snapshot restore Dominik Csapak
2021-05-10 9:27 ` [pbs-devel] [PATCH proxmox-backup v4 1/6] api2/tape/restore: refactor restore code into its own function Dominik Csapak
2021-05-10 9:27 ` [pbs-devel] [PATCH proxmox-backup v4 2/6] api2/tape/restore: add optional snapshots to 'restore' Dominik Csapak
2021-05-10 9:27 ` [pbs-devel] [PATCH proxmox-backup v4 3/6] tape/inventory: add completion helper for tape snapshots Dominik Csapak
2021-05-10 9:27 ` Dominik Csapak [this message]
2021-05-10 9:27 ` [pbs-devel] [PATCH proxmox-backup v4 5/6] ui: tape: add single snapshot restore Dominik Csapak
2021-05-10 9:28 ` [pbs-devel] [PATCH proxmox-backup v4 6/6] docs/api-viewer: improve rendering of array format Dominik Csapak
2021-05-10 15:08 ` [pbs-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210510092800.17956-5-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal