B2 authorization failure using CLI

I have a B2 storage set up and working with the Web UI. However, attempting to list revisions with the CLI prompts and fails:

Enter Backblaze account or application id:***
Enter corresponding Backblaze application key:***
Failed to load the Backblaze B2 storage at b2://***: Authorization failure

To the first prompt I’ve tried my email address, my last name as shown on the Backblaze My Account page, the bucket name, Master Application Key, and 'Master Application Key', all of which fail. What does the CLI want and where do I find it?

There are 3 options to use in these fields:

Enter Backblaze account or application id: your e-mail
Enter corresponding Backblaze application key: your password to access B2

(this is the worst option, the most insecure)

Enter Backblaze account or application id: your Master Application Key
Enter corresponding Backblaze application key: the respective key password

(also not a good option in terms of security)

Enter Backblaze account or application id: a key generated at "App Keys" with appropriate security / access options
Enter corresponding Backblaze application key: the respective key password

(the best choice)

screen1

The first and second options above fail. I didn’t try the third because I don’t want to risk breaking the Web UI.

I think what is confusing here is that the account id is now called the Master Application Key ID. See How can I get my Account ID on Backblaze B2? - Web Applications Stack Exchange

So for option 2 you should enter first this Master Application Key ID and then the Master Application Key. But if you don’t have the old Master Application Key saved somewhere and have to generate a new one, this may break the web GUI.

The best way is option 3 and you need to generate a new pair of application id and key. This won’t affect the web GUI.

OK, a new application id and key worked, thanks.

But that raises the question, what is the Web UI using now to authenticate to B2? If this information was lost, how would I restore it after reinstalling the Web UI? Or could I simply use the new application id and key to reconnect?

Storage credentials are stored in .duplicacy-web/duplicacy.json in an encrypted form. You can run the web GUI from command line with -print-credentials to show the decrypted credentials when a job is run:

/path/to/duplicacy_web_linux_x64 -print-credentials

The command:

/share/CACHEDEV1_DATA/.qpkg/Duplicacy/duplicacy_web -print-credentials &

prints only:

Duplicacy Web Edition 1.4.1 (074ED2)
Starting the web server at http://127.0.0.1:3875

and connections fail with ERR_CONNECTION_REFUSED.

You need to set the home directory so the web GUI can pick up the correct duplicacy.json file.

env HOME=/share/CACHEDEV1_DATA/.qpkg/Duplicacy /share/CACHEDEV1_DATA/.qpkg/Duplicacy/duplicacy_web -print-credentials &

Without setting the home directory you’ll be using /root/.duplicacy-web/duplicacy.json.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.