Improved Handling of DAYS_TO_RETAIN
in Backup Script
#938
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This PR focuses on the refinement and enhancement of the
DAYS_TO_RETAIN
logic within the backup script. The primary objective is to establish clearer, more explicit behavior while ensuring backwards compatibility for any deployments that rely on existing behaviors.Key Changes:
Explicit
DAYS_TO_RETAIN
Handling:DAYS_TO_RETAIN
has been made more explicit. If not set externally, it falls back to the value ofBACKUP_NUM_TO_RETAIN
.DAYS_TO_RETAIN
is sourced fromBACKUP_NUM_TO_RETAIN
, ensuring transparency in its determination.Improved Backup Deletion Logic:
DAYS_TO_RETAIN
has been refined for clarity, accompanied by more descriptive log messages.Backwards Compatibility:
BACKUP_NUM_TO_RETAIN
was implicitly used, this fallback mechanism remains intact. This ensures that the script won't break or change behavior unexpectedly for existing setups.DAYS_TO_RETAIN
will benefit from the clearer, more descriptive behavior and logging.Reason for Change:
The primary reason for this change is to enhance clarity and predictability around backup retention durations. Fixes #937