Have been using Restic to backup to a Google cloud bucket for a long time (since 2019). In the last few days have started getting the following error:
Fatal: unable to open config file: service.Objects.Get: Get “https://storage.googleapis.com/storage/v1/b/my_google_bucket/o/config?alt=json&prettyPrint=false&projection=full”: oauth2: cannot fetch token: 400 Bad Request
Response: {“error”:“invalid_grant”,“error_description”:“Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values in the JWT claim.”}
Nothing has changes with the machine to my knowledge. I have several other machines backing up to their own buckets on Google in the same manner and they are still operating as expected.
restic version
output: restic 0.15.2 compiled with go1.20.3 on linux/amd64
Run Restic with the following script:
#!/bin/sh
export RESTIC_REPOSITORY="gs:my_google_bucket:/"
export RESTIC_PASSWORD="redacted-password"
export GOOGLE_PROJECT_ID="redacted-project-id"
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/restic_google_storage.json"
export RESTIC_COMPRESSION=max
/usr/local/bin/restic "$@"
I tried generating a new JSON credentials file however using that made no difference.
Any ideas?
E.