I’m currently backing up to Google Cloud Storage using the S3 compatibility API. I wanted to try using the new GS backend instead, so I changed my repo URL from
s3:storage.googleapis.com/<bucket name>
to
gs:<bucket name>:/
When I try to run Restic however I get this error:
unable to open config file: service.Objects.Get: googleapi: Error 404: Not Found, notFound
Is there a repository at the following location?
gs:<bucket name>:/
Any idea what I’m doing wrong here? I assume (perhaps incorrectly) that I should be able to access the same backup repository using a different method since it’s just a collection of files, right?
I have a hunch: Historically, when no path is given after the bucket name in the s3 backend, the path /restic is used. So just give it a try with gs:bucket:/restic or use the GCS console to list the contents of the bucket. Is there a restic directory? Does it contain a file called config? Then that’s your repository.
I had wondered about that and I guess I should have mentioned that in my previous post. I wasn’t sure offhand if “/restic” was assumed or not so I tried it both ways. When adding it, I get:
Fatal: wrong password or no key found
Earlier, I just assumed this was because adding restic was not the right path (hence “no key found”).
Between my working S3 config and this version, the only thing I changed was RESTIC_REPOSITORY. Is RESTIC_PASSWORD somehow tied to the backend URL?
Sorry, I figured it out. The repository was still using the s3legacy layout and obviously the GCS backend doesn’t recognize it. I used the migrate command to update the format and now I can see the data using Restic with both backends.