Coolify BackBlaze B2 retention
Coolify provides a way to locally set the retention for backups (how many copies to store):
The problem with this is that it only applies to the local backups, stored in your Coolify instance, and not to the remote S3 backups.
Without any retention policies, your S3 will retain all backups, so over-time you will have huge amounts of data stored that will incur huge monthly costs.
Solution:
One easy solution is to use the Lifecycle settings in your S3 bucket. To automatically deleted old backups in BackBlaze:
- Login into your BackBlaze account.
- Go to Buckets
- There, choose your Coolify backup bucket and access "Lifecycle Settings":
- Select the "Custom lifecycle rules:" radio option.
- Leave the path prefix empty (to apply for all files) and set your desired retention policy (I chose hide after 60 days, delete after 90 days):
Your Bucket will now automatically delete backups older than 90 days.