]> git.proxmox.com Git - proxmox-backup.git/commitdiff
fix #3794: api types: set backup time lower limit to 1
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 15 Dec 2021 13:13:46 +0000 (14:13 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 15 Dec 2021 13:13:49 +0000 (14:13 +0100)
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 <t.lamprecht@proxmox.com>
pbs-api-types/src/datastore.rs

index 693ddfb84c215ca43dca07f46d2afd7388b3c3b6..36279b3a8c509dc7c2afbd3aea623d8b43bed2c1 100644 (file)
@@ -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")