's3 disable cleanup' settings has a wrong description

AI-generated summary

The discussion addresses a misconception regarding the s3 disable cleanup setting. iraszl reported that deleting a local backup also removed it from S3, suspecting a bug. gerhard clarified that this is not a bug but a result of incorrect documentation. He explained that backups are stored either locally or on S3 based on the backup_location setting, so deleting a backup in the UI removes it from whichever location is active. The setting actually prevents the automatic removal of old backups from S3 when the count exceeds maximum_backups.

codinghorerror updated the description to reflect this function. However, philh argued that the phrasing was still confusing due to double negatives. They proposed a clearer alternative: “Manage S3 backup retention externally. When enabled, Discourse will not automatically delete old S3 backups. Configure retention through your S3 provider. The ‘maximum backups’ setting will not apply.” This suggestion aims to eliminate ambiguity and clearly explain the consequence of enabling the setting.

Regardless if the checkbox for s3 disable cleanup - Disable the removal of backups from S3 when removed locally is enabled or disabled in settings, when I delete a backup locally it gets removed from the remote S3 bucket as well. I believe this is a bug, but if not please explain what am I missing. Thank you!

2 Likes

Have we checked this code path recently @gerhard?

4 Likes

It’s not a bug, but the setting description is wrong. All it does is prevent Discourse from deleting old backups from S3 when there are more backups than maximum_backups.

Backups do not work that way anymore. Depending on the value of the backup_location site setting, backups are either stored locally or on S3. When you delete a backup in the UI, it will delete that backup from local storage or S3 depending on that setting.

4 Likes

OK! I’ve edited it to

s3_disable_cleanup: "Prevent removal of old backups from S3 when there are more backups than the maximum allowed."

3 Likes

Please explain what “Prevent removal of old backups from S3 when there are more backups than the maximum allowed.” actually means.

this would be more helpful and prevent the brain bending over double negatives…just sayin’.

Manage S3 backup retention externally

When enabled, Discourse will not automatically delete old S3 backups. Configure retention through your S3 provider. The “maximum backups” setting will not apply.

That removes the double negative and clearly explains the consequence.

1 Like