Setting this up can be rather confusing. Here’s a simple guide to help you out.
- Log into your Discourse admin panel
- Configure daily backups
- Set maximum backups to 7
- Log into your Amazon Web Services account
- Go in the S3 Dashboard
- Open the bucket containing the backups
- Click on the properties tab
- Activate versioning
- Open the Lifecycle menu
- Add a rule for the whole bucket
- Set current version to expire after 15 days
- Set previous version to
- Archive to Glacier after 1 days
- expire after 91 days
- Save and logout
How it works
Versioning will keep backups automaticly deleted by Discourse. One day after beeing deleted it will be moved to the Glacier storage. After 91 days it will be delete from the Glacier storage.
Warning
Amazon charge you for item stored in Glacier for 90 days even if you delete them before. Make sure your Glacier Lyfecicle keep your file at least 90 days.