mirror of
https://github.com/octoleo/restic.git
synced 2024-10-31 19:02:32 +00:00
Rename environment variable to AWS_DEFAULT_REGION
This seems to be the correct name, at least the AWS cli uses it: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
This commit is contained in:
parent
4cadc89ad3
commit
fb95426f64
@ -2,7 +2,7 @@ Enhancement: Add option to configure S3 region
|
|||||||
|
|
||||||
We've added a new option for setting the region when accessing an S3-compatible
|
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
|
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_REGION` or using
|
can do that either by setting the environment variable `AWS_DEFAULT_REGION` or
|
||||||
the option `s3.region`, e.g. like this: `-o s3.region="us-east-1"`.
|
using the option `s3.region`, e.g. like this: `-o s3.region="us-east-1"`.
|
||||||
|
|
||||||
https://github.com/restic/restic/pull/2350
|
https://github.com/restic/restic/pull/2350
|
||||||
|
@ -486,7 +486,7 @@ func parseConfig(loc location.Location, opts options.Options) (interface{}, erro
|
|||||||
}
|
}
|
||||||
|
|
||||||
if cfg.Region == "" {
|
if cfg.Region == "" {
|
||||||
cfg.Region = os.Getenv("AWS_REGION")
|
cfg.Region = os.Getenv("AWS_DEFAULT_REGION")
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := opts.Apply(loc.Scheme, &cfg); err != nil {
|
if err := opts.Apply(loc.Scheme, &cfg); err != nil {
|
||||||
|
@ -198,10 +198,10 @@ default location:
|
|||||||
Losing your password means that your data is irrecoverably lost.
|
Losing your password means that your data is irrecoverably lost.
|
||||||
|
|
||||||
If needed, you can manually specify the region to use by either setting the
|
If needed, you can manually specify the region to use by either setting the
|
||||||
environment variable ``AWS_REGION`` or calling restic with an option parameter
|
environment variable ``AWS_DEFAULT_REGION`` or calling restic with an option
|
||||||
like ``-o s3.region="us-east-1"``. If the region is not specified, the default
|
parameter like ``-o s3.region="us-east-1"``. If the region is not specified,
|
||||||
region is used. Afterwards, the S3 server (``s3.amazonaws.com``) will redirect
|
the default region is used. Afterwards, the S3 server (at least for AWS,
|
||||||
restic to the correct endpoint.
|
``s3.amazonaws.com``) will redirect restic to the correct endpoint.
|
||||||
|
|
||||||
Until version 0.8.0, restic used a default prefix of ``restic``, so the files
|
Until version 0.8.0, restic used a default prefix of ``restic``, so the files
|
||||||
in the bucket were placed in a directory named ``restic``. If you want to
|
in the bucket were placed in a directory named ``restic``. If you want to
|
||||||
|
Loading…
Reference in New Issue
Block a user