Incorrect backup time reported when > 24 hours

NethServer Version: 7.5
Module: Backup data

I’ve noticed something odd in my system. I have the backup data module installed, running a full backup weekly to my FreeNAS box and incrementals throughout the week. The full backup typically takes over 24 hours. But when it finishes, I get this email:

===== Report for data backup =====

Backup started at 2018-07-29 01:00:04
Pre backup scripts status: SUCCESS
Post backup scripts status: SUCCESS
Backup status: SUCCESS
Backup ended at 2018-07-30 06:09:30
Time elapsed: 5 hours, 9 minutes, 26 seconds

Seems whatever script is writing the report doesn’t account for the chance of a backup taking longer than 24 hours.

Here’s the script:

Seems like the easy answer would be to remove the %24 for the hours count. Otherwise, add a days counter that would probably be 0 for most folks, which would be only very slightly less easy. But modulo 24 on the hours without a days counter doesn’t make much sense to me.

1 Like

You’re right. First option seems enough (no need for days). Would you like to do a PR on github?

Done, #23.

3 Likes

Merged!

Happy to see PRs growing into our community :smiley: thanks @dnutan and @danb35