s3: add bucket-lookup parameter to select path or dns style bucket lookup

This is to enable restic working with Alibaba cloud

Fixes #2528
This commit is contained in:
Nick Craig-Wood authored and Alexander Neumann committed 2020-11-05 12:20:10 +01:00
1 parent 636b2f2e94
commit 86b5d8ffaa
4 files changed
+81 -5

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
Enhancement: support Alibaba/Aliyun OSS with S3 backend
We've added a new flag to the s3 backend `s3.bucket-lookup` which can
be set to these 3 values:
- `auto` - existing behaviour
- `dns` - use DNS style bucket access
- `path` - use path style bucket access
To make the s3 backend work with Alibaba/Aliyun OSS you must set
`s3.bucket-lookup` to `dns` and set the `s3.region` parameter. For
example:
restic -o s3.bucket-lookup=dns -o s3.region=oss-eu-west-1 -r s3:https://oss-eu-west-1.aliyuncs.com/bucketname init
Note that s3.region must be set otherwise the minio SDK tries to look
it up and it seems that Alibaba doesn't support that properly.
https://github.com/restic/restic/issues/2528
https://github.com/restic/restic/pull/2535