add option to not warn on having a copy
This commit is contained in:
parent
8c603d6ebd
commit
c2532b64c4
2 changed files with 6 additions and 1 deletions
|
|
@ -75,6 +75,10 @@ configdefinition:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
description: An idle repository will never give warnings that there are no recent backups
|
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:
|
timeout:
|
||||||
type: integer
|
type: integer
|
||||||
# note that the default is also in the python code - in case the host isn't filled in
|
# note that the default is also in the python code - in case the host isn't filled in
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,8 @@ for host in allhosts:
|
||||||
timeout = hosts[host]["timeout"]
|
timeout = hosts[host]["timeout"]
|
||||||
if not idle:
|
if not idle:
|
||||||
if not have_a_copy:
|
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):
|
if most_recent_backup_ts < time.time()-(timeout*24*3600):
|
||||||
output_warning(f"Last backup for {host} is too old")
|
output_warning(f"Last backup for {host} is too old")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue