Backup to S3 configuration problem

AI-generated summary

In a Support thread titled Backup to S3 configuration problem, supervazi reports an error when configuring Discourse to back up to an S3 bucket named community-backup.mydomain.com, citing the restriction on dots in bucket names. Although the bucket complies with AWS naming rules, Discourse rejects it due to HTTPS compatibility issues with AWS’s wildcard SSL certificates, which don’t support dots in bucket names as noted by david and itsbhanusharma. supervazi confirms understanding and accepts that Discourse’s internal S3 backup feature won’t work with their naming standard, planning to use a custom script instead. itsbhanusharma suggests using hyphens as an alternative but acknowledges the user’s constraint. regnatarajan later asks if backups can be accessed via bash for scripting purposes, indicating interest in a workaround. The consensus is that while AWS permits dots, Discourse enforces stricter naming to ensure secure HTTPS access, leaving users with non-compliant names to implement external backup solutions.

Configuring automatic backups conform this topic:

When I want to enter my s3 bucket name I get the following error:

s3_backup_bucket: Value doesn’t match the required format.

The bucket I use exists, it is accessible with the credentials entered in “Files” section, as mentioned in the topic. We have a bucket naming standard and conform that I need to name my bucket in the following format:

[bucket-purpose].[domainname]

So, this backup is named: community-backup.mydomain.com
I think the problem is with dots in the bucket name.
Is there any possibility to use my bucket?

Use hyphens instead of dots?

A cannot change our internal standard. It is with dots. If it will not work with discourse, than I will need to find other solution to copy backups to S3 (own script).

That’s upto Your own Preferences but the easiest way for You to make it work is to use a relatively standard naming scheme.

Sure You Can do that! .

All the Best!

Our naming scheme is 100% compliant with Amazon S3 Bucket Naming Requirements, so it is “relatively standard” :wink:

If discourse do not allow dots in bucket names, then I cant use its internal copy-to-s3 feature.
My question was more like: Why this restriction of using dots?

Anyway, thank you for your quick answer. :slight_smile:

If you search ‘s3 bucket dots’ on this forum there are a few topics about it. It looks like it comes down to the lack of HTTPS support on buckets with dots in the name:

Also, this is From the same AWS Documentation page that You linked above:

  • When using virtual hosted–style buckets with SSL, the SSL wildcard certificate only matches buckets that do not contain periods. To work around this, use HTTP or write your own certificate verification logic. We recommend that you do not use periods (“.”) in bucket names.

The following examples are invalid bucket names:

Invalid Bucket Name Comment
.myawsbucket Bucket name cannot start with a period (.).
myawsbucket. Bucket name cannot end with a period (.).
my..examplebucket There can be only one period between labels.

So, our bucket names are valid, but will not work with amazon wildcard cert. And this is why discourse do not accept bucket names with dots.
Tank you for your help.

Is there a way to access the backups from bash so we can script our own backups?