Hi everyone,
I’m having trouble restoring backups with Restic on Ubuntu. I have my environment variables set in a .env file, and I’m sourcing it before running the restore command, but Restic still asks me to specify the repository location.
I have a file .env.restic :
RESTIC_REPOSITORY="s3:s3.eu-central-003..."
RESTIC_PASSWORD="********"
AWS_ACCESS_KEY_ID="********"
AWS_SECRET_ACCESS_KEY="********"
source .env.restic
restic restore --target=~/Downloads --include=/backup/pictures $SNAPSHOT
but I get
Fatal: Please specify repository location (-r or --repository-file)
restic 0.16.4 compiled with go1.22.2 on linux/amd64
When I do echo $RESTIC_REPOSITORY I see my config. So I don’t understand.
I installed Restic via apt-get on Ubuntu and can’t upgrade b
eyond version 0.16.4, it says that I am on the latest version despite a 0.18.0 existing on the repo.
My questions are:
-
Is it normal that Restic does not automatically pick up the
RESTIC_REPOSITORYenvironment variable after sourcing the.envfile? -
Am I doing something wrong with the way I’m running the restore command?
-
Should I always pass
-rexplicitly with the repository location, or is there a better way? -
Could the inability to upgrade beyond 0.16.4 be related to this issue?