Installing Duplicity 0.7+ on CentOS 6

Issues related to applications and software problems
mphelpsmd
Posts: 30
Joined: 2013/06/09 18:42:22

Installing Duplicity 0.7+ on CentOS 6

Postby mphelpsmd » 2017/12/23 19:27:40

I'm switching to Backblaze B2 as my online backup destination, and plan on using Duplicity for it on my headless CentOS 6.9 server.

The problem is that to use B2 storage with Duplicity requires version 0.7 or later, while the one provided in the EPEL repository is the depreciated version 0.6.26.

I tried uninstalling Duplicity that was installed with yum and the EPEL repository, and attempted the installation from the tarball as recommended on http://duplicity.nongnu.org. (Yes, I understand that this method is discouraged with CentOS, but I didn't see any obvious RPM/repository solutions.)

Prior to downloading the Duplicity tarball and running the Python installation script, I installed additional packages:

Code: Select all

yum install python-devel librsync-devel python-lockfile python-setuptools


After installation, I attempted to verify the version of Duplicity installed:

Code: Select all

[root@ares ~]# duplicity --version
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 42, in <module>
    import fasteners
ImportError: No module named fasteners


I can't find how to install python-fasteners in CentOS 6 to fix this.

So the question is: Is it possible to install Duplicity 0.7 version series with CentOS 6, and if not, what other tool should I be looking at for backups with B2 storage for a headless server?

Michael

User avatar
TrevorH
Forum Moderator
Posts: 21492
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Installing Duplicity 0.7+ on CentOS 6

Postby TrevorH » 2017/12/23 22:26:22

No idea if it's possible but the easy way to try would be to download the EPEL7 version of the SRPM (not rpm) and try running that through the mock utility to rebuild it. So...

yum install epel-release
yum install mock
usermod -a -G mock youruser
<logout & back in>
mock --rebuild /path/to/duplicity-0.7.15-1.el7.src.rpm

If all goes well you'll end up with binary rpms in /var/lib/mock/epel-6-x86_64/result/ ready to be installed.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

mphelpsmd
Posts: 30
Joined: 2013/06/09 18:42:22

Re: Installing Duplicity 0.7+ on CentOS 6

Postby mphelpsmd » 2017/12/24 16:23:58

Trevor, thanks for the help on this.

I couldn't find a valid link to duplicity-0.7.15-1.el7.src.rpm (the link from https://centos.pkgs.org/7/epel-testing- ... 4.rpm.html results in a File not Found error), but was able to find duplicity-0.7.13-1.el7.src.rpm.

I tried the mock --rebuild technique and a subsequent yum install resulted in some dependency errors:

Code: Select all

Error: Package: duplicity-0.7.13.1-2.el6.x86_64 (/duplicity-0.7.13.1-2.el6.x86_64)
           Requires: python2-PyDrive
Error: Package: duplicity-0.7.13.1-2.el6.x86_64 (/duplicity-0.7.13.1-2.el6.x86_64)
           Requires: python-fasteners


My best chance right now might be to use an alternate B2-compatible backup application such as duplicacy (as opposed to duplicity).

Thanks again,

Michael

User avatar
TrevorH
Forum Moderator
Posts: 21492
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Installing Duplicity 0.7+ on CentOS 6

Postby TrevorH » 2017/12/24 16:49:20

Hmm, are you sure you used mock and told it to build for el6? I missed the switch on my example command, would need something like -r epel-6-x86_64 added to the rebuild (unless you're running the build on an el6 machine to start with in which case it would be default).
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke