-
Notifications
You must be signed in to change notification settings - Fork 109
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
how to use with Google Cloud Storage? #214
Comments
hey, i believe you can back up to google cloud storage, i did a quick check using a minimal configuration like below.
manually labelling volume
and amdump should go through. |
@prajwaltr93 thanks a lot, sounds good, and I will test asap. I think I don't have access key and secret key. My service account key file looks like:
I don't see how to set the device_property values using that. Can you help here? Maybe I need a different kind of key(s) from upstream? |
I think I need something like this: https://docs.simplebackups.com/storage-providers/ghsg5GE15AMwMo1qFjUCXn/google-cloud-storage-s3-compatible-credentials/8ZKUSSJRJxA4mU4VdxvRfo Asked the responsible person to generate me those keys. |
Using we should be able to set these as i don't have these kinds of keys, so can't really test this hypothesis, but i hope this helps. |
@prajwaltr93 thanks for investigating. Interesting, but not yet 100% matching, I will see if I can figure out something. |
I think I was able to create the keys via CLI by doing "gcloud auth application-default login", I now have a json like:
Now I try to configure a third "storage" in my
My bucket is named like this: "gs://someprefix_backup-daily/". And I wonder how to configure that, currently I get replies like:
If I remove the "gs://" amanda creates a local subdir ... not useful ... So it seems I am close ... thanks @prajwaltr93 |
my latest try is
Still no success, amcheck simply times out now. I start with the buckets returned by:
I don't know where that "-sb" comes from ... might come from the admin creating it for us. More tomorrow. |
Current error msg with |
from what i know bucket names and '-' don't go well together. '_' shouldn't be a problem |
configurations you are trying with seems right i think, not sure what exactly is causing this issue. but i will be getting my hands on different types of auth credentials apart from access_key and secret_key like |
I checked the debug logs right now and find:
Maybe I have to use new credentials, maybe the permissions on the buckets aren't enough (very likely, I already filed a ticket). |
i think as a quick test to see if creds work would be to perform following curl request:
|
tried your command, got "invalid grant". Reran my stuff with "gcloud auth application-default login", that lead me to some "allow Google Auth library" stuff in the browser and some magic connection to my personal google account. I don't understand this fully, that's why I had disabled that again 2 days ago. Now the test command succeeds, at least I think so. Used the new credentials in amanda.conf. amcheck-device.debug looks different now, amcheck never succeeds, though. I think it tries to create bucket(s) and fails ... I will see what I can quote here without publishing secrets. |
No success. I have:
I am not able to label a tape, One thought is that my account might lack the permission to create new buckets inside the one "parent bucket". I don't know enough about S3 storage to tell that. |
hey, i noticed issue with code handling fetching access_token , currently testing changes. will let you know if it fixes this issue. Thanks. |
Sounds promising, looking forward to any news here. |
@prajwaltr93 Seen your commit. I would have to recompile amanda to apply that. Does it already make sense to try that or do you have other changes planned as well? |
preparing my patched gentoo-ebuild already |
Did a test, no changed behavior so far. Waiting for the upstream admin to check my S3-credentials etc |
hey sorry for the delayed response, yeah as specified in the MR description amanda had trouble reading access_token, that got fixed but further request had issues, i thought it was something to do with latest curl library installed on my machine. so was ruling that out. let me see if it fixes that. |
No problem with the delay, glad you work on that issue. Yes, somewhere I also read that a downgrade of curl helped with accessing S3 (but I can't quote the exact link now). |
turns out google cloud storage does not support HTTP/2 yet, unless configured to use HTTP/2. so added code to use HTTP1.1. now request goes through but returns 400 Bad request, found that content-length header was not accurate, so request was failing with
need to see what is causing this, looks to me that this is not a straight forward fix. need to investigate further. |
@prajwaltr93 thanks for investigating further. Sounds like a difficult task. |
sure, also access_key and secret_key seems to work from my testing, so if you get hands on those, it should do. will be looking into making OAUTH2 work meanwhile. |
I only have the service account key file as mentioned. I don't know if I can generate access_key and secret_key from that. I will research if I find the time. |
here the issue with the curl downgrade: #213 (comment) |
hi, we will be actively working on this in coming weeks as we have allocated time for this fix, will merge and notify when that happens. hope this helps, |
Great to hear, looking forward to a fix and a working setup. |
@prajwaltr93 any progress already? |
downgrading curl now for a test. 7.88.1-r2 ... I'll see in a minute. |
I was looking for how to generate these keys with the CLI-tools for Google Cloud. I am not sure yet. |
curl-7.88.1-r2 doesn't make a difference :-(
|
Same with curl-7.87.0-r2 |
Tried my second HMAC-Keypair. Same errors. |
More context: this is when I run amcheck.
This is only with "STORAGE_API" "AWS4". With "STORAGE_API" "OAUTH2" I get "Missing client_id properties", when I comment out "STORAGE_API", I see:
|
I added
because the bucket is located there. I assume that's important, but it didn't yet fix things. |
i have curl 7.29, which is very old, i will check and see if upgrading to any other version breaks mine. also found this : #137 (comment)
it is similar to findings i had when using latest CURL library, |
i faced similar issues on my Debian 11 WSL
so its narrowing down to libcurl library |
Oh, interesting! I thought I was crazy ;-) |
trying to compile older versions now. 7.81 didn't help. 7.79 neither. But I have to recompile amanda, that's what I missed here. STILL the same errors after compiling amanda against libcurl-7.79 (at least I assume so, maybe I have to recheck things and cleanup some things. This was just a quick first shot) |
No success so far. Went back to curl-7.79 (installed manually), re-compiled amanda etc |
It might be easier for me to compile amanda-3.6. In #213 (comment) it was mentioned that 3.6 doesn't have that issue. Pls tell me which branch to use. |
since you have |
amanda is likely built based on curl library available in /usr/lib/curl/ so i would suggest recompiling. |
Thanks. This leads to new problems, |
went back to curl-7.63 without success |
I'd love to see a patched version with curl enabled, that brings a working libcurl with it ... I currently have to fix the old non-S3 backup installation and feel a bit frustrated here. Basically I have a backup of a 3.5.1-release with buggy libcurl I should be able to roll back to (and that currently also doesn't work fully). Any ideas? Shouldn't there be a patch for curl maybe? I think of patching a current curl-release or so. |
I will set up a new amanda installation on a brand new Debian11 machine and retry things there. curl-7.74 there ... |
opened bug at gentoo as well: https://bugs.gentoo.org/907685 |
we have ticket tracking this exact issue since it was reported. fixing amanda to work with latest curl library would be great, haven't gotten into it yet. will update if any progress is made, |
@prajwaltr93 Why does 3_6 work then? I might try to use that if possible. I could try to come up with a working ebuild for 3_6 and/or build packages for Debian 11. For sure I'd appreciate if you could provide these debian packages also. I contacted the Debian maintainer for amanda also and asked if he already has packages for 3_6. |
you can build deb packages yourself from instructions above, this is how i usually build and install amanda for debian machines.
i was referring to the issue tracker myself, but have to investigate. |
Sure. It would also be great if the amanda project would provide packages for the stable releases at least (3.5.3 anyone?). I think of build pipelines, github actions etc ... just mentioning ... why aren't these things used? -> A set of packages which are known to work and can be used/tested by multiple people. Building for gentoo is a different issue, I understand ... the current packaging subdir doesn't cover that as far as I see.
Thank you. |
you can get 3.5.3 packages here
that would be a great add, let me check with my team if we can do that. |
Really? Where?
Sure, go for it. I think it would be great to have a pipeline that builds amanda with some sane defaults automatically. |
https://www.zmanda.com/downloads/ sorry, missed the link there |
@prajwaltr93 Last time I was at that link, there were only downloads for Debian 8 or so. Thanks, will check these out. |
Is there any documentation or howto for using a Google Cloud Storage bucket?
I was once told that this is possible but never figured out the actual config.
Does anyone use that?
The text was updated successfully, but these errors were encountered: