Backup to S3 configuration problem

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?

3 Likes

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:

https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html

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:

4 Likes

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.
4 Likes

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.

4 Likes

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