Installing Duplicity 0.7+ on CentOS 6

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

Installing Duplicity 0.7+ on CentOS 6

Post by 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
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Installing Duplicity 0.7+ on CentOS 6

Post by 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.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

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

Re: Installing Duplicity 0.7+ on CentOS 6

Post by 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
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Installing Duplicity 0.7+ on CentOS 6

Post by 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).
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

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

Re: Installing Duplicity 0.7+ on CentOS 6

Post by mphelpsmd » 2018/05/24 22:31:45

I recently resurrected this attempt to install a later (version 0.7+) version of duplicity on my CentOS 6 machine.

I tried mock with the "-r epel-6-x86_64" option recommended by TrevorH and it still gave me the two errors (missing python2-PyDrive and python-fasteners), so no improvement here in being able to get it installed on my system.

Any other ideas?

Thanks in advance,

Mike

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Installing Duplicity 0.7+ on CentOS 6

Post by TrevorH » 2018/05/26 07:17:58

Neither of those packages are available for CentOS 6 so you would need to also rebuild those first then add them to a local yum repo that can be used by mock to install them when requested. No idea if either CentOS 7 copy rebuilds cleanly for CentOS 6 or if they will in turn have missing prereqs that you will also need to rebuild first (repeat).
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

tjanez
Posts: 1
Joined: 2018/10/11 14:49:00

Re: Installing Duplicity 0.7+ on CentOS 6

Post by tjanez » 2018/10/11 15:02:55

If anyone is still interested in having the latest Duplicity 0.7 running on CentOS 6, I've made a Copr project which rebuilds the latest EPEL 7 version of Duplicity on EPEL 6:

https://copr.fedorainfracloud.org/coprs ... duplicity/

The only caveat is that the python2-PyDrive requirement has been removed since it is not available on EPEL 6.
And hence one isn't able to use Duplicity with Google Drive.

sclewis23
Posts: 1
Joined: 2018/11/03 01:44:33

Re: Installing Duplicity 0.7+ on CentOS 6

Post by sclewis23 » 2018/11/03 01:55:16

If I previously install 0.6 via yum, do i need to remove it before installing 0.7?

zhukovia
Posts: 1
Joined: 2019/01/18 12:11:35

Re: Installing Duplicity 0.7+ on CentOS 6

Post by zhukovia » 2019/01/18 12:35:02

tjanez wrote:
2018/10/11 15:02:55
If anyone is still interested in having the latest Duplicity 0.7 running on CentOS 6, I've made a Copr project which rebuilds the latest EPEL 7 version of Duplicity on EPEL 6:

https://copr.fedorainfracloud.org/coprs ... duplicity/

The only caveat is that the python2-PyDrive requirement has been removed since it is not available on EPEL 6.
And hence one isn't able to use Duplicity with Google Drive.
I did as you said, but still can't connect to the backblaze B2. Trying to connect

Code: Select all

duplicity ~ B2: / / 000 F6....etc..
I am getting a

Code: Select all

BackendException: B2 backend requires B2 Python APIs (pip install b2)
If I try to install

Code: Select all

pip install b2
then get the

Code: Select all

trace back (most recent call last):
    File "/usr/bin / php", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", line 957, in <module>
What am I doing wrong?
I have CentOS 6.9, Python 2.6.6.
Verifying : python-pip-7.1.0-1.el6.noarch
Verifying : python-setuptools-0.6.10-4.el6_9.noarch

ekranzusch
Posts: 1
Joined: 2019/06/05 21:03:26

Re: Installing Duplicity 0.7+ on CentOS 6

Post by ekranzusch » 2019/06/05 21:10:57

Hi, I know this is a bit stale but I'm stuck on python 2.6 for a bit yet, and got the b2 package to install eventually with the following:

pip install "setuptools==36.8.0" "python-dateutil==2.6.1" "urllib3==1.23" "requests==2.19.1" "b2==1.3.8"

Your main problem is that python 2.6 is very old the latest packages no longer support it.
You really should just move to a newer version of python if at all possible......

Post Reply