mirror of
https://github.com/netinvent/npbackup.git
synced 2025-11-12 07:01:37 +08:00
Fix backup size comparaison on backup failure
This commit is contained in:
parent
eaf59fdd0e
commit
b0964dd151
1 changed files with 2 additions and 1 deletions
|
|
@ -225,7 +225,8 @@ def restic_json_to_prometheus(
|
|||
|
||||
backup_too_small = False
|
||||
if minimum_backup_size_error:
|
||||
if restic_json["data_added"] < int(BytesConverter(str(minimum_backup_size_error).replace(" ", "")).bytes):
|
||||
if not restic_json["data_added"] or \
|
||||
restic_json["data_added"] < int(BytesConverter(str(minimum_backup_size_error).replace(" ", "")).bytes):
|
||||
backup_too_small = True
|
||||
good_backup = restic_result and not backup_too_small
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue