Install duplicity 0.7

see also old v0.6 Duplicity06

CentOS 6.4

Install 0.7.11 from source

If you have yum-installed v0.6, uninstall it first

# yum erase duplicity

# yum install python-devel librsync-devel librsync 

# cd /usr/local/src

wget https://code.launchpad.net/duplicity/0.7-series/0.7.11/+download/duplicity-0.7.11.tar.gz
tar xvfz duplicity-0.7.11.tar.gz

cd duplicity-0.7.11
cat README

REQUIREMENTS:

If you install from the source package, you will also need:

Therefore you may need (for use with scp):

# python --version
Python 2.6.6
# yum install epel-release
# yum install librsync-devel
Installed:
  librsync.x86_64 0:1.0.0-1.el7
# yum install gnupg2
...
Package gnupg2-2.0.22-4.el7.x86_64 already installed and latest version

# yum install python-lockfile
...
Installed:
  python-lockfile.noarch 1:0.9.1-4.el7.centos 

# wget https://pypi.python.org/packages/17/47/72cb04a58a35ec495f96984dddb48232b551aafb95bde614605b754fe6f7/lockfile-0.12.2.tar.gz#md5=a6a1a82957a23afdf44cfdd039b65ff9
# tar xvzf lockfile-0.12.2.tar.gz 
# cd lockfile-0.12.2/
# python setup.py install
# ls -l /usr/lib/python2.6/site-packages/ | grep lockfile
...
(  verify lockfile/ linked to latest version)
...

# pip
-bash: pip: command not found
# curl --remote-name https://bootstrap.pypa.io/get-pip.py
# python get-pip.py

# pip install --upgrade paramiko

Finally install:

# python setup.py install
# duplicity

If you get an error mentioning "FatalBackendException", do this fix/hack:

vi /usr/lib64/python2.6/site-packages/duplicity/errors.py
-- rename class FatalBackendEerror as FatalBackendException

If you have gpg 2.0, you will get this error when you try your first backup

GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: invalid option "--pinentry-mode=loopback"
===== End GnuPG log =====

This is this bug: https://bugs.launchpad.net/duplicity/+bug/1658283

Until you can upgrade to 0.7.12+ you can fix if it with this hack: delete lines 139 to 143 of this file:

# vi /usr/lib64/python2.6/site-packages/duplicity/gpg.py

Operation

Creating SSH Keys for ssh/scp/rsync...

This is in fact a generic procedure for ssh

Origin server: create keys

Destination server:

Origin server: verify ssh works without entering a password

You may see also http://drewsymo.com/how-to/ssh-pubkey-auth-centos/

If it still asks for the password, check the file permissions. Specifically:

Troubleshooting

duplicity/cron/ssh error: The authenticity of host can't be established

This error occurred to me using the ssh backend when using duplicity in a cron job. It would work normally from the command line but the not from cron. Fixed by adding to the cron job:

export HOME=/root

I guess the problem was ssh wouldn't find /root/.ssh/known_hosts

Solution taken from

http://lists.gnu.org/archive/html/duplicity-talk/2013-02/msg00012.html

Links

https://help.ubuntu.com/community/DuplicityBackupHowto

Duplicity (last edited 2017-03-04 11:46:21 by JaumeSola)