-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to backup to Google Cloud bucket using S3 backend on restic v0.15.2 #4322
Comments
Just to be fully clear this is what works for me in my testing:
These do not work:
|
This might be caused by minio/minio-go#1800 . From the change in minio/minio-go#1785 it looks like the bucket location lookup changed from path to virtual host style. My guess would be that if you set Could you compare the initial requests to GCS in the debug log (by setting |
Yes that's correct @MichaelEischer it does work with that set (not something I had tried before). Thanks! Just so I am clear when you say to compare the initial requests in the debug log do you mean to compare between restic |
@joelnb I'm interested in what has changed between restic 0.15.1 and 0.15.2. |
Difference seems to be in the initial HTTP request - the first response in 0.15.2 is a 403. In 0.15.1 it looks like this:
While with 0.15.2 it looks like this:
|
In case it's helpful this is how it looks in 0.15.2 with the extra
|
The main difference between the first two debug log snippets is the following (0.15.1)
(0.15.2)
So the culprit indeed seems to be the from path to virtual hosted style. Although I'd expect GCS to support both variants... |
Is this still an issue with restic 0.16.1? |
I'm actually on 0.16.0 but can confirm it works there without the need to set
I hadn't noticed this until now because I had changed my backup script to set this after your helpful suggestion. |
Thanks for the reply, then let's close this issue as resolved. Or did I miss something? |
Output of
restic version
How did you run restic exactly?
Originally I was trying to backup but I have found it more useful to test with a
snapshots
command so that it does not add any new snapshots and just reads data from the repo. The issue seems to be communication with the backend so I assume it would affect any command that accesses the repo.Example snapshots command:
Example backup command:
This accesses a restic repo at the path
/restic-repo
(this is the real path I use) inside the bucketbackup-bucket
(a made up bucket name).Before running these commands I am exporting required environment variables with credentials that worked on restic
v0.15.1
(and still do if I go back to that version):What backend/server/service did you use to store the repository?
Using the S3 backend to connect to a Google Cloud Platform bucket. In the "Steps to reproduce the behavior" I linked a guide which can be used to set this up the same way using the "Interoperability" settings in Google Cloud Storage.
Expected behavior
Correctly list snapshots or do the backup to the bucket as it did in
v0.15.1
Actual behavior
The error I get is:
I am familiar with this error if I forget to export the required environment variables before running but I have carefully checked that is not the case here & running the exact same steps with
v0.15.1
works okay.Steps to reproduce the behavior
As far as I can tell any backup to a GCP bucket using the S3 backend & credentials provided in this way will have the issue. I do not have access to other cloud providers which I can test using the S3 backend so cannot say if only Google Cloud buckets are affected.
If you have a GCP account you can follow this guide to create the access/secret key in the same way as I have done.
Do you have any idea what may have caused this?
I was able to
git bisect
& find that it seems to have started with 48e065d so I assume it is linked to an updated dependency.Since then I was able to do a similar bisect inside https://github.com/minio/minio-go and find that it seems to have been caused by minio/minio-go#1785 - if I revert that commit (and one small later change which requires it) I get a working restic binary just as I had in
v0.15.1
.I have opened this here rather than on the minio repo because restic is the software I actually use - I am not familiar with minio. I am happy to open a related issue on the minio repo if that would help get this sorted.
Do you have an idea how to solve the issue?
It works for me if I do
go mod edit --replace=github.com/minio/minio-go/v7=../../minio/minio-go
and then make restic build against a minio repo with24cdd7fc940230d35edf1a4d4824c0e7b5a02828
and0bf84b37b1553b5233d14c4d04ce2480b2cf5264
reverted but I do not know of a proper fix as I assume reverting those commits is unlikely to be the real solution going forward.Did restic help you today? Did it make you happy in any way?
Not today specifically but I have been using restic for > 6 years and I am very happy with it. I have nothing bad to say about the performance and I tend to recommend it to people needing a solid backup solution.
The text was updated successfully, but these errors were encountered: