On-site backup frequency setting

AI-generated summary

The discussion addresses the high storage cost of on-site backups on small DigitalOcean instances, where daily backups can consume up to 50% of available space. meglio proposed making the backup frequency configurable to reduce storage usage, suggesting a shift from daily to every two days to save money and delay hardware upgrades. codinghorror supported the idea as a potentially easy and useful site setting. fefrei suggested a more complex, staged retention policy (hourly, daily, and weekly) as an ideal solution, noting that even a simple configurable interval would facilitate external backup strategies. In response to the feedback, zogstrip implemented the requested change by converting the backup_daily? setting into a generic backup_frequency setting, as detailed in the commit.

For the smallest DigitalOcean instance, backups are eating quite a lot - with 7 days backup, I give up 50% of the space just for backups.

Yet I’d still like to have old backups.

The proposition is to make backup frequency configurable. I’d set it to once every 2 days (instead of once every day by default) and save another few GBs - this would free more space for uploads and save me from upgrading my DO instance for another 3-5 months, so literally it would save some $$$.

3 curtidas

Not a bad idea, @zogstrip what do you think? It is one more site setting but it might be easy and useful.

3 curtidas

Even better – albeit a lot more effort – would be a (configurable) staged setting, like this: Do hourly backups, but keep only two of them; in addition, keep one per day for five days, and a weekly backup for a month.

Simply making the interval configurable would at least make it easier to simulate this with external backup software: Let Discourse take hourly backups (keep only one or two), and backup the backup directory with an external software that offers more flexibility.

I changed the backup_daily? site setting to the more generic backup_frequency :date:

https://github.com/discourse/discourse/commit/15418f3d44df7c248ebdb1239092e0aa676b3947

7 curtidas