From 327d14b3d1733079e6b7a4f69ab91e1be4849d80 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 18 May 2022 12:51:07 +0200 Subject: [PATCH] Revert "verify: allow '0' days for reverification" This reverts commit 7a1a5d206d7f526baaa39b86ecb462a870b641c1. We could already cause the behavior by simply setting ignore-verified to false, aas that flag is basically an on/off switch for even considering outdated-after or not. So avoid the extra logic and just make the gui use the previously existing way. Signed-off-by: Thomas Lamprecht --- pbs-api-types/src/jobs.rs | 2 +- src/backup/verify.rs | 2 +- www/datastore/Content.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pbs-api-types/src/jobs.rs b/pbs-api-types/src/jobs.rs index 885b10d4..0477f9b8 100644 --- a/pbs-api-types/src/jobs.rs +++ b/pbs-api-types/src/jobs.rs @@ -156,7 +156,7 @@ pub const IGNORE_VERIFIED_BACKUPS_SCHEMA: Schema = BooleanSchema::new( pub const VERIFICATION_OUTDATED_AFTER_SCHEMA: Schema = IntegerSchema::new("Days after that a verification becomes outdated. (0 means always)") - .minimum(0) + .minimum(1) .schema(); #[api( diff --git a/src/backup/verify.rs b/src/backup/verify.rs index a4703d54..2b36e9fe 100644 --- a/src/backup/verify.rs +++ b/src/backup/verify.rs @@ -595,7 +595,7 @@ pub fn verify_filter( let now = proxmox_time::epoch_i64(); let days_since_last_verify = (now - last_verify.upid.starttime) / 86400; - max_age == 0 || days_since_last_verify > max_age + days_since_last_verify > max_age } } } diff --git a/www/datastore/Content.js b/www/datastore/Content.js index 21ce4964..3a14d9ee 100644 --- a/www/datastore/Content.js +++ b/www/datastore/Content.js @@ -507,7 +507,7 @@ Ext.define('PBS.DataStoreContent', { "backup-type": data["backup-type"], "backup-id": data["backup-id"], "backup-time": (data['backup-time'].getTime()/1000).toFixed(0), - "outdated-after": 0, // always reverify single snapshots + "ignore-verified": false, // always reverify single snapshots }; } else { params = {