From c2532b64c4b644c30f237a90550b304b03335d26 Mon Sep 17 00:00:00 2001 From: Peter Leurs Date: Sun, 17 May 2026 22:37:04 +0200 Subject: [PATCH] add option to not warn on having a copy --- appinfo.yml | 4 ++++ backupmanager.j2 | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/appinfo.yml b/appinfo.yml index d16b1be..3df4d67 100644 --- a/appinfo.yml +++ b/appinfo.yml @@ -75,6 +75,10 @@ configdefinition: type: boolean default: false description: An idle repository will never give warnings that there are no recent backups + needscopy: + type: boolean + default: true + description: Will backup manager complain if there is no copy of the backup timeout: type: integer # note that the default is also in the python code - in case the host isn't filled in diff --git a/backupmanager.j2 b/backupmanager.j2 index 063e48b..d3ff954 100644 --- a/backupmanager.j2 +++ b/backupmanager.j2 @@ -243,7 +243,8 @@ for host in allhosts: timeout = hosts[host]["timeout"] if not idle: if not have_a_copy: - output_warning(f"We do not have a copy for {host}") + if hosts[host]["needscopy"]: + output_warning(f"We do not have a copy for {host}") if most_recent_backup_ts < time.time()-(timeout*24*3600): output_warning(f"Last backup for {host} is too old")