Backblaze b2 no longer works

Hello,

I am using on Linux with a Backblaze b2 target and this was working fine for ages using the following kind of command line:

 /usr/bin/duplicati-cli backup --backup-name="My Backup" --dbpath=/var/lib/duplicati/.config/Duplicati/ABCDEF.sqlite --server-datafolder /var/lib/duplicati/.config/Duplicati --encryption-module=aes --compression-module=zip --dblock-size=50mb --passphrase="whatever" --disable-module=console-password-input --asynchronous-concurrent-upload-limit=10 --keep-versions=1 "b2://abcedf123-my_bucket/?auth-username=abce457ed&auth-password=abcdef0123456789" /folder/to/backup/

I have just updated duplicati to version 2.1.0.116_canary_2025-04-17 as offered in the AUR and after figuring out the need for the --server-datafolder option, I still can’t get it to run properly, it gives me this error:

Insufficient permissions to read "b2://abcedf123-my_bucket/?auth-username=abce457ed&auth-password=abcdef0123456789", skipping 
=> Access to the path '/home/obones/b2:/abcedf123-my_bucket/?auth-username=abce457ed&auth-password=abcdef0123456789' is denied.

This doesn’t make any sense, why would it consider my B2 URL as a relative folder?

I looked at the documentation where apparently the parameters got renamed to b2-accountid and b2-applicationkey. Sadly, changing the URL to use those parameters does not change anything, still an error message about trying to access a folder relative to my home folder.

The previous docs mentions command line arguments to use instead of placing them in the URL but even this does not help, I get error messages about unknown arguments.

What have I missed here?

Are you missing the “=” in your server-datafolder option?

--server-datafolder=/var/lib/duplicati/.config/Duplicati

2 Likes

Spot on!
Too bad the error message details mentions some totally unrelated issue…
Well, thinking about it, it considers the /var/lib/duplicati/.config/Duplicati to be the destination and anything after it a source folder to backup, but I would never have found it by myself.
Thanks a lot

1 Like

The options have aliases, so you can use either. The auth-username/auth-password alias is supported for all backends, so you can use that if you like to keep it consistent across all backends.

Yeah, it is not obvious, but if you look at the command without the -- options:

/usr/bin/duplicati-cli 
  backup 
  /var/lib/duplicati/.config/Duplicati 
  "b2://abcedf123-my_bucket/?auth-username=abce457ed&auth-password=abcdef0123456789" 
  /folder/to/backup/

You can see that it wants to read the b2 + /folder and store it in /var/lib/duplicati/.config/Duplicati.

The fix for this is to use a modern commandline parse, so it will detect things like an empty folder argument.

I’m not really following the progress of such things, but I sometimes wonder about option value syntax, e.g. the case here where it wanted an equal sign before the option’s value.

In contrast, ServerUtil built-in help shows a space, and I haven’t tested it using an equal.

Option formats is silent on this.

Command Line Interface CLI lays out a fairly specific layout that it thinks should be used:

duplicati-cli <command> <remote url> [arguments and options]

which I think would have avoided (or at least changed) confusion here if it had been used.

People surely debate such things, but I favor detection if it doesn’t limit legitimate usages, including ones that are not totally by-the-book (e.g. CLI book above) but are now allowed.