From 323ad7ddc0557e6d9c6987ade1e76318a85063ce Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 15 Dec 2021 14:13:46 +0100 Subject: [PATCH] fix #3794: api types: set backup time lower limit to 1 Some users want to import historical backups but they run into the original lower backuo-time limit one can pass. That original limit was derived from the initial PBS development start in 2019, it was assumed that no older backup can exist with PBS before it existing, but imports of older backups is a legitimate thing. I pondered using 683071200 (1991-08-25), aka the first time Linux was publicly announced by Linus Torvalds as new limit but at the end I did not wanted to risk that and backup software is IMO to serious for such easter eggs, so I went for 1, to differ between the bogus 0 some tools fallback too if there's something off with time. Signed-off-by: Thomas Lamprecht --- pbs-api-types/src/datastore.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs index 693ddfb8..36279b3a 100644 --- a/pbs-api-types/src/datastore.rs +++ b/pbs-api-types/src/datastore.rs @@ -55,7 +55,7 @@ pub const BACKUP_TYPE_SCHEMA: Schema = StringSchema::new("Backup type.") .schema(); pub const BACKUP_TIME_SCHEMA: Schema = IntegerSchema::new("Backup time (Unix epoch.)") - .minimum(1_547_797_308) + .minimum(1) .schema(); pub const BACKUP_GROUP_SCHEMA: Schema = StringSchema::new("Backup Group")