doc: specify AWS Region via AWS_DEFAULT_REGION

If no specific Region is mentioned in RESTIC_REPOSITORY, AWS defaults to
us-east-1. For this reason, users that follow the tutorial and create
their S3 bucket in any other region get the following error:

"Fatal: create repository at [...] client.BucketExists"

Explicitly specifying the AWS region name fixes the issue.
This commit is contained in:
Emanuele Rocca 2022-04-20 10:06:55 +02:00 committed by Michael Eischer
parent fb5b9370f3
commit 38c0531b52

View file

@ -202,11 +202,12 @@ configuration of restic will be placed into environment variables. This will
include sensitive information, such as your AWS secret and repository password. include sensitive information, such as your AWS secret and repository password.
Therefore, make sure the next commands **do not** end up in your shell's Therefore, make sure the next commands **do not** end up in your shell's
history file. Adjust the contents of the environment variables to fit your history file. Adjust the contents of the environment variables to fit your
bucket's name and your user's API credentials. bucket's name, region, and your user's API credentials.
.. code-block:: console .. code-block:: console
$ unset HISTFILE $ unset HISTFILE
$ export AWS_DEFAULT_REGION="eu-west-1"
$ export RESTIC_REPOSITORY="s3:https://s3.amazonaws.com/restic-demo" $ export RESTIC_REPOSITORY="s3:https://s3.amazonaws.com/restic-demo"
$ export AWS_ACCESS_KEY_ID="AKIAJAJSLTZCAZ4SRI5Q" $ export AWS_ACCESS_KEY_ID="AKIAJAJSLTZCAZ4SRI5Q"
$ export AWS_SECRET_ACCESS_KEY="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" $ export AWS_SECRET_ACCESS_KEY="LaJtZPoVvGbXsaD2LsxvJZF/7LRi4FhT0TK4gDQq"