How does one configure an S3 bucket and restore backups from it?

How does one configure an S3 bucket and restore backups from it?

When utilizing an S3 bucket, is it necessary to input the following variables beneath the env variables in the app.yml file, or is it sufficient to configure them solely within the admin settings?

  DISCOURSE_USE_S3: true
  DISCOURSE_S3_REGION: us-west-1
  DISCOURSE_S3_ACCESS_KEY_ID: myaccesskey
  DISCOURSE_S3_SECRET_ACCESS_KEY: mysecretkey
  DISCOURSE_S3_CDN_URL: https://falcoland-files-cdn.falco.dev
  DISCOURSE_S3_BUCKET: falcoland-files
  DISCOURSE_S3_BACKUP_BUCKET: falcoland-files/backups
  DISCOURSE_BACKUP_LOCATION: s

When I enabled only the S3 bucket in the admin settings, I downloaded the backup files from S3 to migrate to a new server and restore the backup. Everything was done according to the forum’s tutorial, yet the restoration of the backup failed, much like the situation described in this post.

The ultimate solution steps are as follows:

That’s a known problem. As a workaround, you could temporarily disable the enable_s3_uploads site setting before creating the backup. You can re-enable on the new server after the restore.

How might one properly utilize the restoration of backups from an S3 bucket in the event that my server becomes inoperable due to a crash, virus infection, or severe attack, necessitating the download of backup files from the S3 bucket and the subsequent restoration of these backups on a new server?

Thank you for any advice offered by anyone!

1 Like

This is a very serious issue. Does this mean that the backups in S3 are meaningless?

After numerous attempts, I have found that backups in S3 cannot be restored at will. I have consulted many posts, all of which report that restoring backups from S3 has failed.

I sincerely hope someone can summarize how to configure S3 backups and how to restore them from S3.

1 Like