How to install Backupninja to CentOS?

1. Install the EPEL repo

2. Install the backupninja rpm package:

yum install backupninja

3. Patch /usr/share/backupninja/mysql

The Debian’s stable version of Backupninja is a outdated, so I apply 2 patches from the Backupninja’s latest version to /usr/share/backupninja/mysql:

3.1.

Replace the line:

table=$( expr match "$qualified_table" "$db\.\([^\w]*\)" )

with the following one:

table=$( expr match "$qualified_table" "$db\.\(.\+\)" )

0xacab.org/riseuplabs/backupninja/blob/f5d083dc/handlers/mysql.in#L273

3.2.

Replace the line:

execstr="$DUMP -r '$dumpdir/${db}.sql'"

with the following one:

execstr="$DUMP > '$dumpdir/${db}.sql'"

0xacab.org/riseuplabs/backupninja/blob/f5d083dc/handlers/mysql.in#L299

4. How to install Duplicity to CentOS?

5. How to avoid SSH / SCP / SFTP connection resets during a long operation?

6. How to install Paramiko to CentOS?

7. How to install Boto to CentOS?

8. How to fix «/usr/lib64/python2.7/site-packages/duplicity/util.py:79: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6» in Duplicity?