[pbs-devel] [PATCH proxmox-backup 2/3] fix #3786: ui/cli: add resync-corrupt option on sync-jobs
Gabriel Goller
g.goller at proxmox.com
Tue Oct 15 15:18:22 CEST 2024
Add the `resync-corrupt` option to the ui and the
`proxmox-backup-manager` cli. It is listed in the `Advanced` section,
because it slows the sync-job down and is useless if no verification
job was run beforehand.
Signed-off-by: Gabriel Goller <g.goller at proxmox.com>
Originally-by: Shannon Sterz <s.sterz at proxmox.com>
---
src/bin/proxmox-backup-manager.rs | 9 +++++++++
www/window/SyncJobEdit.js | 11 +++++++++++
2 files changed, 20 insertions(+)
diff --git a/src/bin/proxmox-backup-manager.rs b/src/bin/proxmox-backup-manager.rs
index 38a1cf0f5881..08728e9d7250 100644
--- a/src/bin/proxmox-backup-manager.rs
+++ b/src/bin/proxmox-backup-manager.rs
@@ -339,6 +339,10 @@ fn task_mgmt_cli() -> CommandLineInterface {
schema: TRANSFER_LAST_SCHEMA,
optional: true,
},
+ "resync-corrupt": {
+ schema: RESYNC_CORRUPT_SCHEMA,
+ optional: true,
+ },
}
}
)]
@@ -355,6 +359,7 @@ async fn pull_datastore(
group_filter: Option<Vec<GroupFilter>>,
limit: RateLimitConfig,
transfer_last: Option<usize>,
+ resync_corrupt: Option<bool>,
param: Value,
) -> Result<Value, Error> {
let output_format = get_output_format(¶m);
@@ -391,6 +396,10 @@ async fn pull_datastore(
args["transfer-last"] = json!(transfer_last)
}
+ if let Some(resync_corrupt) = resync_corrupt {
+ args["resync-corrupt"] = Value::from(resync_corrupt);
+ }
+
let mut limit_json = json!(limit);
let limit_map = limit_json
.as_object_mut()
diff --git a/www/window/SyncJobEdit.js b/www/window/SyncJobEdit.js
index 6543995e8800..a3c497fc2185 100644
--- a/www/window/SyncJobEdit.js
+++ b/www/window/SyncJobEdit.js
@@ -321,6 +321,17 @@ Ext.define('PBS.window.SyncJobEdit', {
deleteEmpty: '{!isCreate}',
},
},
+ {
+ fieldLabel: gettext('Resync corrupt snapshots'),
+ xtype: 'proxmoxcheckbox',
+ name: 'resync-corrupt',
+ autoEl: {
+ tag: 'div',
+ 'data-qtip': gettext('Re-sync snapshots, whose verfification failed.'),
+ },
+ uncheckedValue: false,
+ value: false,
+ },
],
},
{
--
2.39.5
More information about the pbs-devel
mailing list