Hey, I thought it’d be nice to let you know: I’ve just merged a PR which updates the library we’re using for accessing BackBlaze B2 (https://github.com/kurin/blazer) so that restic now supports “Application Keys”. Before, you could just have one set of credentials for accessing B2, which could not be restricted. With Application Keys, you can now create several credentials with different access privileges, e.g. you can restrict an application key to a specific bucket and/or path.
I was just trying to use application keys and, as it did not seem to work, I searched the internet and found that this feature has been added (what a coincidence). Nevertheless, I have downloaded and compiled the latest version from github but I did not succeed.
What I have done is to use an application key with read and write access to a bucket (only for one bucket) as value for the B2_ACCOUNT_KEY variable but I have only managed to get this error:
I have double checked the key is correct and even deleted it and created a new one to be sure they key was correct. When I change the value of the B2_ACCOUNT_KEY to the master key everything works as expected.
An application key consists of a B2_ACCOUNT_ID (which is longer than the master account ID) and a B2_ACCOUNT_KEY. Only setting the latter won’t get you access to your data
Great. Now the restic documentation explains the procedure in a very clear way.
I am really not impressed by the related documentation provided by Backblaze. Despite of taking some time to understand how app keys work i got it wrong.