[pbs-devel] [PATCH proxmox-backup 1/3] verify: allow '0' days for reverification
Dominik Csapak
d.csapak at proxmox.com
Thu Jan 27 15:13:19 CET 2022
and let it mean that we will always reverify
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
pbs-api-types/src/jobs.rs | 4 ++--
src/backup/verify.rs | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pbs-api-types/src/jobs.rs b/pbs-api-types/src/jobs.rs
index c6664104..0e83da73 100644
--- a/pbs-api-types/src/jobs.rs
+++ b/pbs-api-types/src/jobs.rs
@@ -145,8 +145,8 @@ pub const IGNORE_VERIFIED_BACKUPS_SCHEMA: Schema = BooleanSchema::new(
.schema();
pub const VERIFICATION_OUTDATED_AFTER_SCHEMA: Schema = IntegerSchema::new(
- "Days after that a verification becomes outdated")
- .minimum(1)
+ "Days after that a verification becomes outdated. (0 means always)")
+ .minimum(0)
.schema();
#[api(
diff --git a/src/backup/verify.rs b/src/backup/verify.rs
index e37c63be..e835d625 100644
--- a/src/backup/verify.rs
+++ b/src/backup/verify.rs
@@ -560,7 +560,7 @@ pub fn verify_filter(
let now = proxmox_time::epoch_i64();
let days_since_last_verify = (now - last_verify.upid.starttime) / 86400;
- days_since_last_verify > max_age
+ max_age == 0 || days_since_last_verify > max_age
}
}
}
--
2.30.2
More information about the pbs-devel
mailing list