From: Stefan Sterz <s.sterz@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [RFC PATCH 3/4] fix #3786: ui/cli: add deep sync option to ui and cli
Date: Wed, 15 Jun 2022 10:20:39 +0200 [thread overview]
Message-ID: <20220615082040.96959-4-s.sterz@proxmox.com> (raw)
In-Reply-To: <20220615082040.96959-1-s.sterz@proxmox.com>
make "deep sync" an advanced option because: a) you need to know that
it has no effect unless a previous verify job has been executed b) it
might take a lot more time to finish since it has to check each
manifest and c) the default "off" should be what most users want.
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
---
src/bin/proxmox-backup-manager.rs | 13 +++++++++++--
www/window/SyncJobEdit.js | 11 +++++++++++
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/src/bin/proxmox-backup-manager.rs b/src/bin/proxmox-backup-manager.rs
index 89598c90..0c0191dd 100644
--- a/src/bin/proxmox-backup-manager.rs
+++ b/src/bin/proxmox-backup-manager.rs
@@ -12,8 +12,8 @@ use proxmox_sys::fs::CreateOptions;
use pbs_api_types::percent_encoding::percent_encode_component;
use pbs_api_types::{
BackupNamespace, GroupFilter, RateLimitConfig, SyncJobConfig, DATASTORE_SCHEMA,
- GROUP_FILTER_LIST_SCHEMA, IGNORE_VERIFIED_BACKUPS_SCHEMA, NS_MAX_DEPTH_SCHEMA,
- REMOTE_ID_SCHEMA, REMOVE_VANISHED_BACKUPS_SCHEMA, UPID_SCHEMA,
+ DEEP_SYNC_BACKUPS_SCHEMA, GROUP_FILTER_LIST_SCHEMA, IGNORE_VERIFIED_BACKUPS_SCHEMA,
+ NS_MAX_DEPTH_SCHEMA, REMOTE_ID_SCHEMA, REMOVE_VANISHED_BACKUPS_SCHEMA, UPID_SCHEMA,
VERIFICATION_OUTDATED_AFTER_SCHEMA,
};
use pbs_client::{display_task_log, view_task_result};
@@ -260,6 +260,10 @@ fn task_mgmt_cli() -> CommandLineInterface {
schema: NS_MAX_DEPTH_SCHEMA,
optional: true,
},
+ "deep-sync": {
+ schema: DEEP_SYNC_BACKUPS_SCHEMA,
+ optional: true,
+ },
"group-filter": {
schema: GROUP_FILTER_LIST_SCHEMA,
optional: true,
@@ -284,6 +288,7 @@ async fn pull_datastore(
ns: Option<BackupNamespace>,
remove_vanished: Option<bool>,
max_depth: Option<usize>,
+ deep_sync: Option<bool>,
group_filter: Option<Vec<GroupFilter>>,
limit: RateLimitConfig,
param: Value,
@@ -319,6 +324,10 @@ async fn pull_datastore(
args["remove-vanished"] = Value::from(remove_vanished);
}
+ if let Some(deep_sync) = deep_sync {
+ args["deep-sync"] = Value::from(deep_sync);
+ }
+
let result = client.post("api2/json/pull", Some(args)).await?;
view_task_result(&client, result, &output_format).await?;
diff --git a/www/window/SyncJobEdit.js b/www/window/SyncJobEdit.js
index 948ad5da..da1b0bed 100644
--- a/www/window/SyncJobEdit.js
+++ b/www/window/SyncJobEdit.js
@@ -232,6 +232,17 @@ Ext.define('PBS.window.SyncJobEdit', {
editable: '{isCreate}',
},
},
+ {
+ fieldLabel: gettext('Deep sync'),
+ xtype: 'proxmoxcheckbox',
+ name: 'deep-sync',
+ autoEl: {
+ tag: 'div',
+ 'data-qtip': gettext('Check if all snapshots passed the last verification job and if not re-sync them?'),
+ },
+ uncheckedValue: false,
+ value: false,
+ },
],
},
{
--
2.30.2
next prev parent reply other threads:[~2022-06-15 8:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 8:20 [pbs-devel] [RFC PATCH 0/4] fix #3786: add a "deep sync" option to sync jobs Stefan Sterz
2022-06-15 8:20 ` [pbs-devel] [RFC PATCH 1/4] fix #3786: api: add deep sync parameter Stefan Sterz
2022-08-02 9:19 ` Fabian Grünbichler
2022-06-15 8:20 ` [pbs-devel] [RFC PATCH 2/4] fix #3786: server/datastore: add deep sync parameter to pull sync jobs Stefan Sterz
2022-08-02 10:07 ` Fabian Grünbichler
2022-06-15 8:20 ` Stefan Sterz [this message]
2022-06-15 8:20 ` [pbs-devel] [RFC PATCH 4/4] fix #3786: docs: document deep sync behavior and prerequisites Stefan Sterz
2022-06-22 10:52 ` [pbs-devel] [RFC PATCH 0/4] fix #3786: add a "deep sync" option to sync jobs Matthias Heiserer
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=20220615082040.96959-4-s.sterz@proxmox.com \
--to=s.sterz@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