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
Script does not delete old backups due to the LEFT check
Description:
When running the backup script on a weekly basis (via cron schedule 0 0 * * 0), the older backups are not getting deleted as expected. The core issue lies in the LEFT check in combination with the BACKUP_NUM_TO_RETAIN value.
Steps to Reproduce:
Set BACKUP_NUM_TO_RETAIN to 4.
Run the script weekly.
Observe that after 5 weeks, there are 5 backups and none of the older backups have been deleted.
Expected Behavior:
After the number of backups surpasses the BACKUP_NUM_TO_RETAIN value, the oldest backups that exceed this count and are older than the DAYS_TO_RETAIN threshold should be deleted.
Actual Behavior:
Older backups are never deleted, regardless of their age, due to the LEFT check. Since we're only creating 1 backup per week and DAYS_TO_RETAIN is set to 4 days, the condition for deletion is never met.
The text was updated successfully, but these errors were encountered:
Script does not delete old backups due to the
LEFT
checkDescription:
When running the backup script on a weekly basis (via cron schedule
0 0 * * 0
), the older backups are not getting deleted as expected. The core issue lies in theLEFT
check in combination with theBACKUP_NUM_TO_RETAIN
value.Steps to Reproduce:
BACKUP_NUM_TO_RETAIN
to 4.Expected Behavior:
After the number of backups surpasses the
BACKUP_NUM_TO_RETAIN
value, the oldest backups that exceed this count and are older than theDAYS_TO_RETAIN
threshold should be deleted.Actual Behavior:
Older backups are never deleted, regardless of their age, due to the
LEFT
check. Since we're only creating 1 backup per week andDAYS_TO_RETAIN
is set to 4 days, the condition for deletion is never met.The text was updated successfully, but these errors were encountered: