gilbertchen / duplicacy

A new generation cloud backup tool
https://duplicacy.com
Other
5.06k stars 333 forks source link

Support for B2 Application Keys #484

Open ChristofferKarlsson opened 5 years ago

ChristofferKarlsson commented 5 years ago

Backblaze recently made B2 Application Keys available, a feature that lets you create application specific keys, that also can restrict access to specific buckets. Using the B2 account for more than one thing, it would be very nice to use these more restricted keys.

I tried to use a generated API key (restricted to only one bucket), but it doesn't seem to work with the current version - 2.1.1:

$ duplicacy init -e data-backup b2://***
Enter Backblaze Account ID: app-key-id
Enter Backblaze Application Key: app-key
URL request 'https://api002.backblazeb2.com/b2api/v1/b2_list_buckets' returned status code 400
URL request 'https://api002.backblazeb2.com/b2api/v1/b2_list_buckets' returned status code 400
...

Links to Backblaze

TheBestPessimist commented 5 years ago

Is this a duplicate of: https://github.com/gilbertchen/duplicacy/issues/485 ?

ChristofferKarlsson commented 5 years ago

@TheBestPessimist Yes, it is about the same feature. Missed that it was already a PR on it.

TheBestPessimist commented 5 years ago

Well actually i am wrong: #485 is the duplicate here :D.

bekriebel commented 5 years ago

Oops, I missed that someone had opened this as an issue before creating mine. I closed that duplicate issue.

PR #475 is a fix for this and has been open for some time now. I'm hoping it can get merged so I can start using official versions again.

TheBestPessimist commented 5 years ago

This has been implemented via: https://github.com/gilbertchen/duplicacy/commit/674d35e5cae603b641a048609ff48335a36ebb36.

adrianmihalko commented 5 years ago

Guys, how can I use application key id?

@ubuntu:~$ duplicacy init -e ubuntu-backup b2://my-b2-bucket
Enter Backblaze Account ID:312939939393
Enter Backblaze Application Key: llxlxlxlxlxlxlxlxl
Failed to load the Backblaze B2 storage at  b2://my-b2-bucket: Authorization failure

I enter my newly created Application Key, but I get Authorization failure. What I am missing here?