Unable to init b2 bucket on FreeBSD

Just getting started for the first time with both b2 and Duplicacy. I’ve configured a private bucket on b2 and confirmed it’s there using the b2 command line app (i.e. b2 list_buckets returns the bucket ID I’m expecting once I’ve authed in).

I’m trying duplicacy init homedir b2://<bucketid> from my homedir. When I enter my Account ID and the Application Key I’ve created that only has access to <bucketid> I get:

Failed to load the Backblaze B2 storage at b2://<bucketid>: Authorization failure

Now, when I enter my Account ID and my Master Application Key, I get:

Failed to load the Backblaze B2 storage at b2://<bucketid>: Bucket <bucketid> not found

Am I missing a step here?

Thanks in advance.

Welcome to the forum!

There’s really a problem in B2 API, see Backblaze B2 Application Keys.

I use the CLI version and storages in B2, with the same syntax that you described, without problems.

Have you checked the bucket name using the web interface?

Could you post the full command you’re using, with all the options?

Hi, I did post the command:

duplicacy init homedir b2://<bucketid>

When I use the b2 CLI tool with my b2 master auth key I see all of my buckets. When I use the duplicacy CLI above with the very same Account ID and Master Auth Key, I get: “Bucket not found.”

I thought your real command might be using more options that could be in wrong order. So your command is simple, let’s assume it doesn’t have a syntax error.

A silly question: you’re not using the <>, right?

Sorry the wiki page wasn’t clear on this. It should be the name of the bucket, not the id of the bucket.

2 Likes

That did the trick, thank you!

I’m assuming that I can only use the master application key to auth? I ask since that’s the only way it seems to work for me.

I just had a very similar problem to this, and am adding a reply so it’s more obvious to other people.

If you create a B2 application key, you need to use the keyId for that key with the application key you just created.

For example, I just created an application key in my B2 account, and the result messages looks like this:

Success! Your new application key has been created. It will only appear here once.
K1234567890+abcdefghijkl+mnopqr
keyId: 123450a1b2c3d4e56789012345 keyName: blah

So in this case, when I init the repository (whether using the GUI or the command line), I use the 123450a1b2c3d4e56789012345 when Duplicacy asks me for the account id, and then I use K1234567890+abcdefghijkl+mnopqr for the application key when it asks for that (btw, I’m not sure if I put the right number of characters in my examples above)

My conclusion is that you ONLY use your overall account id when you use your master application key.

Hope that makes sense and helps.

2 Likes

Thanks @cheitzig, your post helped me solve the issue I had with B2 as well. I wish some of this would be documented in the wiki/CLI guide somewhere. Anyways, thanks for your post!