So you’d like to automatically back up all your Discourse data every day?
Go to the /admin
settings, backup, and set backup_frequency
to 1
.
Now backup will be taken every day.
If you’re self-hosted you can access them at /var/discourse/shared/standalone/backups/default
.
Store backups on local server or Amazon S3
WARNING
Storing backups and regular uploads in the same bucket and folder is no longer supported and will not work.
By default backups are stored on the local server disk. In order to store backups on Amazon S3, you’ll need to create a unique, private S3 bucket and put it’s name in the s3_backup_bucket
site setting.
The S3 bucket should only be used for backups. If you need to use a bucket that contains other files please make sure that you provide a prefix when you configure the
s3_backup_bucket
setting (example:my-awesome-bucket/backups
) and make sure that files with that prefix are private.
You can follow most of the steps in Set up file and image uploads to S3 if you need help in setting up a new bucket.
Next, set your S3 credentials under the Files section: s3_access_key_id
, s3_secret_access_key
, and s3_region
.
Finally, you need to select “S3” as backup_location
.
From now on all backups will be uploaded to S3 and not be stored locally anymore. Local storage will only be used for temporary files during backups and restores.
Go to the Backups tab in the admin dashboard to browse the backups – you can download them any time to do a manual offsite backup.
Note that you can also enable an automatic move to Glacier bucket lifecycle rule to keep your S3 backup costs low.