mirror of
https://github.com/restic/restic.git
synced 2025-08-12 16:17:41 +00:00
Add AWS_REGION env var to specify s3 region
This commit is contained in:

committed by
Alexander Neumann

parent
aa5af8af0e
commit
df500a372d
@@ -22,6 +22,7 @@ type Config struct {
|
||||
|
||||
Connections uint `option:"connections" help:"set a limit for the number of concurrent connections (default: 5)"`
|
||||
MaxRetries uint `option:"retries" help:"set the number of retries attempted"`
|
||||
Region string
|
||||
}
|
||||
|
||||
// NewConfig returns a new Config with the default values filled in.
|
||||
|
@@ -66,7 +66,7 @@ func open(cfg Config, rt http.RoundTripper) (*Backend, error) {
|
||||
},
|
||||
},
|
||||
})
|
||||
client, err := minio.NewWithCredentials(cfg.Endpoint, creds, !cfg.UseHTTP, "")
|
||||
client, err := minio.NewWithCredentials(cfg.Endpoint, creds, !cfg.UseHTTP, cfg.Region)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "minio.NewWithCredentials")
|
||||
}
|
||||
|
Reference in New Issue
Block a user