myENA / consul-backinator

Command line Consul backup and restore utility supporting KVs, ACLs and Queries
Mozilla Public License 2.0
226 stars 22 forks source link

Added S3 PathStyle-Option #42

Closed iceman91176 closed 6 years ago

iceman91176 commented 6 years ago

Added functionality to confige the S3-Path-Style-Option. By default the S3-clients uses the bucketname as hostname to access the S3 storage, eg. https://BUCKET.s3.provider.com/....

If the prvoider does not support this, but instead uses the format http://s3.provider.com/BUCKET/... consul-backinator was not working.

Now it is possible to set the parameter pathstyle=true in the S3-URL, and the bucket will be accessed by path and not by hostname.

Example s3://KEY:SECRET@BUCKET/test_backup.bak?region=us-east-1&endpoint=s3.provider.com&pathstyle=true

aaronhurt commented 6 years ago

@iceman91176 Thanks for the PR! Looks like the tests are failing due to some upstream repository changes. I'll try to get those fixed.