Didn’t see anywhere to explicitly set the bucket region and it seems to be going with us-east-1 rather than us-east-2. Where is it getting us-east-1 from?
It seems that the bucket name you meant to use, is already in use by someone else.
Could you try to use a different name? Also for troubleshooting purposes, you could try to create the S3 bucket manually on the AWS website and see if you get a similar error - this would conclude that it’s not a problem with restic or your configuration.
The 301 is a normal HTTP permanent redirect and not an error in that sense.
Here are the restic options you can set. I believe that you can even set Minio options but I am not 100% sure about that.
restic options
All Extended Options:
azure.connections set a limit for the number of concurrent connections (default: 20)
b2.connections set a limit for the number of concurrent connections (default: 5)
gs.connections set a limit for the number of concurrent connections (default: 20)
local.layout use this backend directory layout (default: auto-detect)
rclone.args arguments for running rclone (default: serve restic --stdio --b2-hard-delete --drive-use-trash=false)
rclone.connections set a limit for the number of concurrent connections (default: 5)
rclone.program path to rclone (default: rclone)
rest.connections set a limit for the number of concurrent connections (default: 5)
s3.connections set a limit for the number of concurrent connections (default: 5)
s3.layout use this backend layout (default: auto-detect)
s3.retries set the number of retries attempted
s3.storage-class set S3 storage class (STANDARD, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING or REDUCED_REDUNDANCY)
sftp.command specify command to create sftp connection
sftp.layout use this backend directory layout (default: auto-detect)
swift.connections set a limit for the number of concurrent connections (default: 5)
Additionally, there is this guide: Examples — restic 0.16.3 documentation
It might be a bit outdated but maybe it’s still helpful.
I don’t have a S3 repo myself so I can’t give you more info than I found myself.
Another idea is to search the forum a bit for anything related to S3 and regions.
Hey @sloar, getting back to you about S3 bucket region.
A new restic version just got released where you can specify the bucket region for S3.
See all the details here: Release restic 0.9.6 · restic/restic · GitHub
Enhancement #2350: Add option to configure S3 region
We’ve added a new option for setting the region when accessing an S3-compatible service. For some providers, it is required to set this to a valid value. You can do that either by setting the environment variable AWS_DEFAULT_REGION or using the option s3.region , e.g. like this: -o s3.region="us-east-1" .
This is an old question, but it’s the first result on Google for a problem I had today, so I’ll put a hint in here for anyone that has a similar problem in future.
Fatal: create repository at s3:s3.amazonaws.com/(bucketname) failed: client.BucketExists: 301 Moved Permanently
The problem was I hadn’t given the IAM user permissions to write to the bucket (whoops).