I am trying to configure automatic backups with restic and the s3-compatible api. I am mostly following @arthur’s guide from a year ago, but with s3-compatible instead of b2 (as the backblaze docs and restic docs currently recommend). I managed to upload my first test backup repository, but am getting an error when I try to run the command to restore the backup:
> sudo restic-daily restore --target restore-backup latest
/run/agenix/restic/env: line 1: AWS_ACCESS_KEY_ID: command not found
/run/agenix/restic/env: line 2: AWS_SECRET_ACCESS_KEY: command not found
Fatal: unable to open repository at s3:s3.<location>.backblazeb2.com/
<bucket>: s3.getCredentials: no credentials found. Use `-o s3.unsafe-
anonymous-auth=true` for anonymous authentication
At first I thought it might be because I’m using fish, but I took that line out of my user’s nix config options and it gives the same error with bash. Does anyone see what I’m missing here?
And then it’s in an agenix secret in /etc/nixos/secrets that I think can be accessed via my system’s ssh key and my user “admin”'s ssh key. This is my first time using agenix or any kind of secrets manager. I have confirmed manually that it is decrypting into /run/agenix/secrets/restic (or some path like that; away from computer atm)