Installation of Backintime on CentOS7

Back-in-time
Back-in-time

Introduction

Back-in-time is a great backup solution for Linux written in Python 3.  It provides similar features to that of Apple’s Timemachine backup system.  With Back-in-time, you can automatically take snapshots of your files at regular intervals, and using a UI, restore files when needed.  It’s actually pretty neat.

But…

The developers have more or less, solely focused their development on Debian-based Linux distributions, such as Ubuntu.  They provide PPA package repositories, and .deb builds of the software, but do not provide rpms for Redhat-based distros, such as CentOS.

It is however, not all their fault.  They have moved onto using Python3, which is an entirely different beast to Python2, and not backwards compatible.  Meanwhile, CentOS is equivalent to Canonical’s LTS releases, and only sports Python 2.7.  This incompatibility between versions of Python is a real pain-in-the-arse!  But I digress.

To install a recent version of Python3 on CentOS, I have made use of the CentOS IUS repository.  I find this much simpler and easier to use than Redhat’s Software Collections.

So this guide steps you through the process of installing all the necessary CentOS packages, compiles necessary libraries, and installs Back-in-time on CentOS7.

Default CentOS Configuration

This guide assumes that a Gnome Desktop was the the chosen software installation. First thing is to update your system with all the latest package versions.

$ sudo yum -y update

CentOS/EPEL Package Requirements

Following is a list of all the packages required from either the base/updates repository for CentOS, or the EPEL repository:

  • meld-3.16.4-2.el7.noarch
  • 1:dbus-devel-1.6.12-17.el7.x86_64
  • glib2-devel-2.46.2-4.el7.x86_64
  • dbus-glib-devel-0.100-7.el7.x86_64
  • sip-4.14.6-4.el7.x86_64
  • group “Development Tools”
$ sudo yum install meld dbus-devel glib2-devel dbus-glib-devel
$ sudo yum groupinstall "Development Tools"

IUS Package Requirements

Now, lets go through the steps of adding the IUS repository to yum, and install the required packages.

Install IUS Package Manager

$ wget -O install.sh setup.ius.io
$ sudo sh install.sh

Install the following packages from IUS

  • qt5-qtbase-5.6.1-10.el7.x86_64
  • qt5-qtbase-gui-5.6.1-10.el7.x86_64
  • qt5-qtbase-devel-5.6.1-10.el7.x86_64
  • python36u-3.6.2-1.ius.centos7.x86_64
  • python36u-libs-3.6.2-1.ius.centos7.x86_64
  • python36u-devel-3.6.2-1.ius.centos7.x86_64
  • python36u-setuptools-33.1.1-1.ius.centos7.noarch
  • python36u-pip-9.0.1-1.ius.centos7.noarch
$ sudo yum install qt5-qtbase qt5-qtbase-gui qt5-qtbase-devel python36u python36u-libs python36u-devel python36u-setuptools- python36u-pip

PIP Package Requirements

Some Python3 modules are required by Back-in-time, that aren’t available from IUS.  So we will use Python PIP package manager to install them.  The following packages are required:

  • SecretStorage (2.3.1)
  • dbus-python (1.2.4)
$ sudo pip3.6 install SecretStorage dbus-python

We also need a C header file for dbus in the next step, so let’s download the source distribution for dbus-python and copy it into a common location.

$ sudo pip3.6 download dbus-python
$ tar xzf dbus-python-1.2.4.tar.gz
$ sudo cp -r dbus-python-1.2.4/include/dbus /usr/local/include/

Source Compile Requirements

Next, we need to compile and install SIP and PyQt5. Sadly this is necessary as the python wheel binary packages do not include pre-requisites for backintime. Sip is missing the sip binary and PyQt5, dbus.mainloop.pyqt5 support.

SIP

Download SIP from the riverbankcomputing website. Then follow their install Instructions. The following is a TL;DR version.

$ cd /usr/local/bin
$ sudo ln -s /usr/bin/python3.6 python3
$ cd
$ wget 'https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.3/sip-4.19.3.tar.gz'
$ tar xzf sip-4.19.3.tar.gz
$ cd sip-4.19.3
$ python3 configure.py
$ make
$ sudo make install

PyQt5

Download PyQt5 from the riverbankcomputing website. Then follow their install Instructions. The following is a TL;DR.

$ wget 'https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.9/PyQt5_gpl-5.9.tar.gz'
$ tar xzf PyQt5_gpl-5.9.tar.gz
$ cd PyQt5_gpl-5.9
$ python3 configure.py --dbus /usr/local/include/ --qmake /usr/bin/qmake-qt5

At this point, I have uncovered a bug in the configure.py script for generating the Makefiles for a Redhat-derived distribution. The following commands will solve the issue by way of a patch to one of the build files.

$ cd dbus
$ patch -p0 dbus.pro
23a24,25
> INCLUDEPATH += /usr/include/dbus-1.0
> INCLUDEPATH += /usr/lib64/dbus-1.0/include

Now, press Ctrl-D to signal end of input and deploy the patch.

Now we rebuild the Makefile and commence the compilation process

$ /usr/bin/qmake-qt5 -o Makefile dbus.pro
$ cd ..
$ make -j4
$ sudo make install

Now we can download and install backintime.

$ cd
$ git clone https://github.com/bit-team/backintime.git
$ cd backintime
$ cd common
$ ./configure && make
$ sudo make install
$ cd ../qt
$ ./configure && make
$ sudo make install

All things going well, you should now be able to start up backintime from an X session with:

$ backintime-qt

or via the menu.

Go forth, and backup your CentOS workstation!

backintime-centos7
Screenshot of Back-in-time running on CentOS7
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: