diff --git a/bundles/backup-server/files/check_backup_for_node b/bundles/backup-server/files/check_backup_for_node index 9765c59..b7866f8 100644 --- a/bundles/backup-server/files/check_backup_for_node +++ b/bundles/backup-server/files/check_backup_for_node @@ -10,7 +10,7 @@ NODE = argv[1] ONE_BACKUP_EVERY_HOURS = int(argv[2]) NOW = int(time()) -DAY_SECONDS = 60 * 60 * 24 +HOUR_SECONDS = 60 * 60 snaps = set() @@ -46,9 +46,9 @@ try: # One day without backups is still okay. There may be fluctuations # because of transfer speed, amount of data, changes in backup # schedule etc. - if delta > (DAY_SECONDS * (ONE_BACKUP_EVERY_HOURS + 2)): + if delta > ((HOUR_SECONDS * (ONE_BACKUP_EVERY_HOURS + 1)) + (HOUR_SECONDS*24)): exit(2) - elif delta > (DAY_SECONDS * (ONE_BACKUP_EVERY_HOURS + 1)): + elif delta > (HOUR_SECONDS * (ONE_BACKUP_EVERY_HOURS + 1)): exit(1) else: exit(0)