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 ESMTPS id 0212770C4F for ; Wed, 15 Jun 2022 10:20:47 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id F407A276AC for ; Wed, 15 Jun 2022 10:20:46 +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 ESMTPS id 50D732769D for ; Wed, 15 Jun 2022 10:20:46 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 2A8BF43B53 for ; Wed, 15 Jun 2022 10:20:46 +0200 (CEST) From: Stefan Sterz To: pbs-devel@lists.proxmox.com Date: Wed, 15 Jun 2022 10:20:39 +0200 Message-Id: <20220615082040.96959-4-s.sterz@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220615082040.96959-1-s.sterz@proxmox.com> References: <20220615082040.96959-1-s.sterz@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.056 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - 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-backup-manager.rs] Subject: [pbs-devel] [RFC PATCH 3/4] fix #3786: ui/cli: add deep sync option to ui and cli 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, 15 Jun 2022 08:20:47 -0000 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 --- 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, remove_vanished: Option, max_depth: Option, + deep_sync: Option, group_filter: Option>, 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