You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected Behavior
When one runs rotate-backups with flag hourly=0, all hourly backups will be removed.
Observed Behavior
When one runs rotate-backups with flag hourly=0, one hourly backup will be preserved. As you can see from the log below, this missbehavior does not occur for daily=0.
rotate-backups --hourly=0 --daily=0 --weekly=4 --monthly=12 --yearly=always --dry-run /archive
sh: --daily=0: unknown operand
INFO Performing a dry run (because of --dry-run option) ..
INFO Scanning /archive for backups ..
INFO Found 20 timestamped backups in /archive.
INFO Preserving /archive/backup-2021-08-11T21-30-33.tar.gz (matches 'monthly' and 'yearly' retention periods) ..
INFO Preserving /archive/backup-2021-10-16T21-20-05.tar.gz (matches 'monthly' retention period) ..
INFO Preserving /archive/backup-2021-11-01T03-00-07.tar.gz (matches 'monthly' retention period) ..
INFO Preserving /archive/backup-2021-12-01T03-00-07.tar.gz (matches 'monthly' retention period) ..
INFO Deleting /archive/backup-2021-12-20T03-00-07.tar.gz ..
INFO Preserving /archive/backup-2021-12-27T03-00-08.tar.gz (matches 'weekly' retention period) ..
INFO Preserving /archive/backup-2022-01-01T12-00-08.tar.gz (matches 'weekly', 'monthly' and 'yearly' retention periods) ..
INFO Deleting /archive/backup-2022-01-01T16-00-07.tar.gz ..
INFO Preserving /archive/backup-2022-01-03T03-00-07.tar.gz (matches 'weekly' retention period) ..
INFO Deleting /archive/backup-2022-01-04T03-00-08.tar.gz ..
INFO Deleting /archive/backup-2022-01-05T00-00-07.tar.gz ..
INFO Deleting /archive/backup-2022-01-06T00-00-07.tar.gz ..
INFO Deleting /archive/backup-2022-01-07T00-00-07.tar.gz ..
INFO Deleting /archive/backup-2022-01-08T03-00-07.tar.gz ..
INFO Deleting /archive/backup-2022-01-09T03-00-07.tar.gz ..
INFO Preserving /archive/backup-2022-01-10T00-00-07.tar.gz (matches 'weekly' retention period) ..
INFO Deleting /archive/backup-2022-01-11T00-00-08.tar.gz ..
INFO Deleting /archive/backup-2022-01-12T00-00-08.tar.gz ..
INFO Deleting /archive/backup-2022-01-13T00-00-08.tar.gz ..
INFO Preserving /archive/backup-2022-01-13T09-01-49.tar.gz (matches 'hourly' retention period) ..
Interestingly, the script echos sh: --daily=0: unknown operand.
Further, if hourly=-1, all hourly backups will be removed:
rotate-backups --hourly=-1 --daily=0 --weekly=4 --monthly=12 --yearly=always --dry-run /archive
INFO Performing a dry run (because of --dry-run option) ..
INFO Scanning /archive for backups ..
INFO Found 20 timestamped backups in /archive.
INFO Preserving /archive/backup-2021-08-11T21-30-33.tar.gz (matches 'monthly' and 'yearly' retention periods) ..
INFO Preserving /archive/backup-2021-10-16T21-20-05.tar.gz (matches 'monthly' retention period) ..
INFO Preserving /archive/backup-2021-11-01T03-00-07.tar.gz (matches 'monthly' retention period) ..
INFO Preserving /archive/backup-2021-12-01T03-00-07.tar.gz (matches 'monthly' retention period) ..
INFO Deleting /archive/backup-2021-12-20T03-00-07.tar.gz ..
INFO Preserving /archive/backup-2021-12-27T03-00-08.tar.gz (matches 'weekly' retention period) ..
INFO Preserving /archive/backup-2022-01-01T12-00-08.tar.gz (matches 'weekly', 'monthly' and 'yearly' retention periods) ..
INFO Deleting /archive/backup-2022-01-01T16-00-07.tar.gz ..
INFO Preserving /archive/backup-2022-01-03T03-00-07.tar.gz (matches 'weekly' retention period) ..
INFO Deleting /archive/backup-2022-01-04T03-00-08.tar.gz ..
INFO Deleting /archive/backup-2022-01-05T00-00-07.tar.gz ..
INFO Deleting /archive/backup-2022-01-06T00-00-07.tar.gz ..
INFO Deleting /archive/backup-2022-01-07T00-00-07.tar.gz ..
INFO Deleting /archive/backup-2022-01-08T03-00-07.tar.gz ..
INFO Deleting /archive/backup-2022-01-09T03-00-07.tar.gz ..
INFO Preserving /archive/backup-2022-01-10T00-00-07.tar.gz (matches 'weekly' retention period) ..
INFO Deleting /archive/backup-2022-01-11T00-00-08.tar.gz ..
INFO Deleting /archive/backup-2022-01-12T00-00-08.tar.gz ..
INFO Deleting /archive/backup-2022-01-13T00-00-08.tar.gz ..
INFO Deleting /archive/backup-2022-01-13T09-01-49.tar.gz ..
Regards,
Jan
The text was updated successfully, but these errors were encountered:
Cheers,
this is a bug report:
Expected Behavior
When one runs rotate-backups with flag
hourly=0
, all hourly backups will be removed.Observed Behavior
When one runs rotate-backups with flag
hourly=0
, one hourly backup will be preserved. As you can see from the log below, this missbehavior does not occur fordaily=0
.Interestingly, the script echos
sh: --daily=0: unknown operand
.Further, if
hourly=-1
, all hourly backups will be removed:Regards,
Jan
The text was updated successfully, but these errors were encountered: