Running 18.04LTS

I've installed Duplicity... it seems to work. I'm running duplicity

I've installed the B2 Command line tool... it works without issue.

I get the following when I try to run a simple backup like the one noted on the backblaze site.

eddie@xxxx:~$ duplicity ~ b2://xxxxxxx:xxxxxxxxxxx@Test-Bucket
BackendException: B2 backend requires B2 Python APIs (pip install b2)

I've installed pip & pip 3 and also the b2 via pip... like this.

pip install b2
pip3 install b2

I ultimately, get the same error. I assume I'm missing some kind of PIP dependency but I have no clue what.

  • My solution for now... use Restic instead. – Eddie Mar 24 '19 at 22:00

I've had this issue, and it was caused by the b2 package splitting into two parts (b2 and b2sdk), and the sdk part (which duplicity relies on) changing its name as a result of this.

Latest duplicity codebase supports both older and newer version of the library, but older versions such as does not.

What fixed this for me was removing duplicity with apt, and installing it with pip instead (I used python3 instead of python2 as python2 is EOL):

sudo apt remove duplicity
sudo apt install build-essential python3-dev gettext librsync-dev
sudo -H pip3 install duplicity
  • 2
    This fixed it for me. Even though it is already mentioned in the answer, I would add that you need to install b2sdk with pip3 install b2sdk (took me a minute to carefully read the new error message) – fronk Oct 13 '20 at 20:58
  • Fixed it for me thank you!!! – Mr. T Feb 23 at 20:20

An update:

I learned that the B2 Application key is not supported. I needed to create a Master Application key instead. It did not contain any slashes and I eventually got connected with this result: How to fix Duplicity B2 (Backblaze) error

It says that there is a bug that has been fixed in 0.7.18. According to the reply this is available in a ppa. It seems not in the standard repositories for the 18.04 as I did not get it with sudo apt upgrade.

  • Unfortunately, I am running I upgraded in hopes that would help... nope. – Eddie Mar 28 '19 at 23:17

I faced the same issue. I got with some progress, but not fully resolved the issue. I am running on Ubuntu 18.04 LTS as well. The duplicity version is 0.7.17 (straight from the default repository).

Before installing the pip and adding the b2 I did add (apt install) some other packages that were suggested by the package manager at the time of installing duplicity. Namely: python-pexpect, python-urllib3 and python-oauthlib.

With these installed I run the duplicity again. I do not get the BackendException on B2 Python API any more.

However, I faced another error message (another issue?):

InvalidBackendURL: Syntax error (port) in: b2://xxxxxxxx:YYYYY/yyy@hv-homes/ AFalse BNone xxxxxxxxx:YYYYY

It is perhaps worth mentioning that my application key contains "/" and the error message repeats it until the "/"-sign. I do not know if this error relates to the same B2 API or is something else. At least I do not have a request to install b2 anymore :-)

  • Hi Mika. I think that you should open a separate question and reference this one, because you ran into a new error message that the O.P. didn't have, as you suggested, it maybe a separate issue. – Hee Jin Mar 26 '19 at 22:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.