WebFaction
Community site: login faq

I'd like to set up Duplicity to backup from my Webfaction account to another server. I believe there was a tutorial for doing this on the old help site ( at http://forum.webfaction.com/viewtopic.php?pid=12771), but the old link seems to redirect to the community index page.

Is this tutorial still available? If not, is there anything I should be aware of before attempting to install from source?

asked 09 Jan '13, 04:59

BenAtWide
312
accept rate: 0%


The old forum has been taken offline, but here's the content from the forum post you mentioned, originally posted in November 2009 by forum member "davel":


Duplicity is an excellent backup tool, and I got it working on WebFaction.

Duplicity features:

  • bandwidth- and space-efficient incremental backups
  • supports many protocols: ssh/scp, rsync, webdav, ftp, amazon s3, and more
  • backups can be encrypted

Here's how I installed it:

cd
cat <<'EOF' > .bashrc_duplicity
export PATH=$HOME/bin:$PATH
export MANPATH=$HOME/man:$HOME/lib/python2.4/share/man:$MANPATH
EOF
source .bashrc_duplicity
cat <<'EOF' >> .bashrc
if [ -f ~/.bashrc_duplicity ]; then
    source ~/.bashrc_duplicity
fi
EOF
mkdir tmpsources
cd tmpsources
curl -LO http://downloads.sourceforge.net/project/librsync/librsync/0.9.7/librsync-0.9.7.tar.gz
tar xvzf librsync-0.9.7.tar.gz
cd librsync-0.9.7
./configure
make install exec_prefix=$HOME prefix=$HOME
cd ..
curl -LO http://code.launchpad.net/duplicity/0.6-series/0.6.06/+download/duplicity-0.6.06.tar.gz
tar xvzf duplicity-0.6.06.tar.gz
cd duplicity-0.6.06
./setup.py --librsync-dir=$HOME build
./setup.py install --home=$HOME
cd
rm -rf tmpsources
duplicity --version

Here's an example of how to use it:

nice duplicity \
    --volsize 25 \
    --no-encryption \
    --asynchronous-upload \
    --verbosity 4 \
    /PATH/TO/FAMILY/JEWELS 's3+http://S3BUCKETNAME'

You'll probably want to make a cron job; I wrote mine to do a full backup monthly and incremental backups daily.

If you want to back up to an Amazon S3 bucket, then you'll need to install boto, too:

cd
mkdir tmpsources
cd tmpsources
curl -LO http://boto.googlecode.com/files/boto-1.8d.tar.gz
tar xvzf boto-1.8d.tar.gz
cd boto-1.8d
python setup.py build
python setup.py install --home=$HOME
cd
rm -rf tmpsources

And for extra credit, here's a command-line S3 tool:

cd
mkdir tmpsources
cd tmpsources
curl -LO http://downloads.sourceforge.net/project/s3tools/s3cmd/0.9.9.91/s3cmd-0.9.9.91.tar.gz
tar xvzf s3cmd-0.9.9.91.tar.gz
cd s3cmd-0.9.9.91
python setup.py install --home=$HOME
cd
rm -rf tmpsources
s3cmd --version
permanent link

answered 09 Jan '13, 11:24

seanf
12.2k42136
accept rate: 37%

With the forum being taken offline the FAQ should be updated, or it should be brought back in a read-only state for situations such as this again.

(09 Jan '13, 17:14) bitspill

Ok, I updated the FAQ - thanks for pointing it out :)

(09 Jan '13, 17:28) seanf

Found another reference to the old forums over at https://help.webfaction.com/

(23 Jan '13, 23:21) bitspill

Ok, fixed.

(24 Jan '13, 10:09) seanf

FollowUp - Solutions and Questions

Thanks for this Tutorial. - I have managed to setup nearly the same, though due to lack of write access to my Home Folder I have created a webapp called backup (that listens on a port).

If you simply add to pretty much every path above starting with $HOME ? $HOME/webapp/<backup-webapp-name> and take care to not use the cd command, but rather move within the $HOME/webapp/<backup-webapp-name>, it works quite nice.

I was not able to use

s3cmd --configure

to set it up, because it has no option where to save the config file. I simply installed it all on my local machine, ran the --configure and copied the configuration file to my $HOME/webapp/<backup-webapp-name> and afterwards started

s3cmd -c $HOME/webapp/<backup-webapp-name> srcfg

Until now my only issue is, that I am not able to setup boto in a way that duplicity recognizes it's there. But pushing data to an AmazonS3 worked with s3cmd.

permanent link

answered 18 Apr '13, 15:31

ulf
1
accept rate: 0%

I'm on a 64 bit server, so I had to change the setup procedure a little bit to get it working.

First of all, I needed to install librsync as a shared library; and for some reason, this did not work with version 0.9.7, so I had to install librsync 0.9.6, like this:

curl -LO http://downloads.sourceforge.net/project/librsync/librsync/0.9.6/librsync-0.9.6.tar.gz
tar xvzf librsync-0.9.6.tar.gz 
cd librsync-0.9.6
./configure --enable-shared
make install exec_prefix=$HOME prefix=$HOME

This allowed me to install duplicity; but on execution, I always received an error that "lockfile" was not found. I could install that via "easy_install-2.6" (if you're using a different python version, you may have to use the appropriate version).

easy_install-2.6 lockfile

Which caused the next error: Python could not find the librsync library I had just installed. For this to work, I had to append the right path to the LD_LIBRARY_PATH variable. I did that by adding the following line to my "~/.bash_profile":

export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH

That did it! After logging out and in again, the path was used, and finally, "duplicity" worked for me.

permanent link

answered 10 Jul '14, 09:47

PrimaryFeather
3115
accept rate: 0%

Another update, for reference:

I'm now on CentOS 7, and the how-to from above still works, basically. I can now even use the latest versions of duplicity and librsync. Here are the steps I used to install duplicity:

Add the following entries to your “~/.bash_profile” file:

export PATH=$HOME/bin:$PATH
export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH

Install "pip":

mkdir ~/lib/python2.7
easy_install-2.7 pip

Install duplicity's dependencies. Personally, I want to backup to the Google Drive, so I installed "PyDrive", as well.

pip install --user lockfile
pip install --user PyDrive

Now's the time to install librsync:

mkdir temp
cd temp
wget http://downloads.sourceforge.net/project/librsync/librsync/0.9.7/librsync-0.9.7.tar.gz
tar xvzf librsync-0.9.7.tar.gz
cd librsync-0.9.7
./configure --enable-shared
make install exec_prefix=$HOME prefix=$HOME

Finally, we can install duplicity itself:

cd ../..
wget https://code.launchpad.net/duplicity/0.7-series/0.7.10/+download/duplicity-0.7.10.tar.gz
tar xvzf duplicity-0.7.10.tar.gz
cd duplicity-0.7.10
./setup.py --librsync-dir=$HOME build
./setup.py install --home=$HOME

That's it!

duplicity --version
# -> duplicity 0.7.10

Enjoy! I hope that little tutorial helps some Webfaction users.

permanent link

answered 23 Aug '16, 09:15

PrimaryFeather
3115
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×36
×2

question asked: 09 Jan '13, 04:59

question was seen: 5,749 times

last updated: 23 Aug '16, 09:15

                              
WEBFACTION
REACH US
SUPPORT
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM