Discourse and S3 are great friends. If you are familiar with S3, it will be very helpful for you.
Many people have limited virtual hosting space and resources.
Using S3 for backups can make better use of space.
You can follow the steps below to configure:
Set Backup Frequency
Go to admin > backup, and set backup_frequency to 1. This parameter indicates the backup frequency, with a default of 7.
1 means backing up once a day.
7 means backing up once every 7 days.
For general website access, if you are using S3 for backup storage, it is best to back up once a day.
Set Backup Bucket and Path.
This Bucket can be private and not publicly accessible. It is important to note that if you are also using S3 for image and attachment storage, that Bucket needs to be set to public.
For convenience, you can create another bucket here. Try not to confuse it with the storage for attachments and images.
We recommend setting an additional directory path here, as Discourse will create multiple necessary folders within this folder.
This will make your storage clearer and more defined.
Set s3_access_key_id and s3_secret_access_key
Next, you need to set the s3_access_key_id, s3_secret_access_key, and s3_region for your backup data. These 3 parameters are very important, and the region must be selected correctly. If your backups are not uploading, it is most likely a permission issue.
For specific setup methods, please refer to the content in the article: Setting up file and image uploads to S3 - sysadmin - Discourse Meta .
It is important to note that you need to grant sufficient permissions to your key ID, otherwise you will not be able to upload.
Set Backup to S3 Storage
Set the backup method to S3 storage.
You need to change the storage from Local to S3 in this parameter selection.

Test Backup
Once everything is set up, you can test the backup.
Click the backup button to test the backup. In the backup menu, simply click Backup.
In the pop-up window, you will be asked whether to include uploaded images and attachments.
Generally, you would select Yes here. The interface will then redirect to the log interface, and the backup information will be displayed through the logs. You can determine if the backup is complete by observing whether the log displays “Finished”.
More importantly, you can log in to your S3 account to confirm that the latest backup is available.
You need to pay attention to the time, size, and filename for confirmation.
By setting up S3 backups, we can expand Discourse’s storage space, gaining almost unlimited backup and storage capacity. For website operations, automatic backup and upload are very practical features.
You will also have multiple backup storage points, making it easier to restore to different backup points when recovering your website.
Since you have separated the backup files from Docker, this is very helpful for your daily backups and can significantly reduce storage space usage.
We also recommend storing images and attachments on S3, which offers significant advantages for migration and backup recovery.
Please refer to the original article iSharkFly - 飞鲨 for more information.









