look for interval given via parameter instead of $interval

Signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>
squeeze spaces to avoid issues with space padded timestamps

Signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>
if hourly count!=24, skip some of the hours

If the retain count for hourly backups is not 24, then it
makes more sense to evenly spread the 'hourly' backups
throughout the day at equal intervals.

That means if we keep 6 'hourly' backups, then we trigger a
hourly backup at every 4 hours, instead of every hour.

Signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>