rsync like backup to Rackspace Cloud File with duplicity
It seems that there is no much documentation about how to do rsync like backup with duplicty so here it is :
- Install python-cloudfiles from here http://github.com/rackspace/python-cloudfiles
- Install duplicity, its available directly from Debian or alike distros (ie: ubuntu) or you can do that from source from the homepage.
- Get your API Key from https://manage.rackspacecloud.com/ and use a script like this :
#!/bin/bash UPLOAD_TO_CONTAINER="backup" #adjust it as you like export CLOUDFILES_USERNAME=Your Username export CLOUDFILES_APIKEY=API_KEY_YOU_GOT export PASSPHRASE=The Passphrase for your encrypted backup duplicity /full/path cf+http://${UPLOAD_TO_CONTAINER} |
This should take care to upload the backup files to the backup container. It does that incrementally and detect the changes to your file system to upload. There is much more option for duplicity look at the manpage for more info.
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

I’m not sure what I’m doing wrong but I keep receiving syntax errors in my script I used the exact script above with my info filled in. I saved the script as backup.py and run try running with with the following command:
python backup.py
but I keep receiving syntax errors.
What version of duplicty you have ? you can check it with the command line duplicity -V
It says duplicity 0.4.10
you probably want to have a newer version than that I got 0.6.05 for me.
it’s a shell script so save it as a .sh and run it bash backup.sh for example
You probably make sure you have to read the manpage as well of duplicity
Alright now when I run the shell script I receive the following error:
Unknown scheme ‘cf+http’
Tristan,
You probably need to update your version of Duplicity. What version do you have?
duplicity –version
Let me know.
the latest version of duplicity in the latest version of debian (lenny) is 0.4.11
is there a way to get a more current version that apt can understand?
The only way i can see is or to have a custom build package for duplicity or mix debian stable and unstable by pinning the stable distro for everything but duplicity. If you go on irc on freenode.net #cloudfiles some debian gurus would be able to help you.
There is as well the install from sources.
hi there chmouel… how do you install the rackspace cloudfiles once you’ve downloaded the tar? I tried ‘python setup.py’, but that didn’t seem to be the right invocation.
like a standard python modules it simple as to do :
python setup.py install
python setup.py –help will give you all the option if you want to.
As always you can find some great ‘live’ help for Rackspace Cloudfiles on the irc.freenode.net #cloudfiles.
thx…
everything works!
thanks chmouel.
first off, the version of duplicity in the lenny repository is something like 0.4.11, and you need something later (0.5.??) to support the ‘cf+http’ backend.
As chmoel suggested, the #cloudfiles irc channel at freenode was quite helpful… there was not a more recent debian build, and so someone built it for me. This is to soon be worked into the debian backports repo.
Then you have to get and install the rackspace cloudfiles python bindings; there’s a pointer to them someplace on this blog.
and the only other thing is, duplicity uses https to talk to rackspace, so if you’re behind a firewall (like I was), you have to open up port 443.
cheers for that, I probably going to clarify a bit by a new blog post to explain how to setup of all of this since it seems to create a bit of burden for some people.
[...] Tout est très bien expliqué ici : http://blog.chmouel.com/2009/09/02/rsync-like-backup-to-rackspace-cloud-file-with-duplicity/ [...]
[...] for backing up various data from my servers and home (I recommend s3sync, s3fs for S3 or MossoFS, CloudFiles/Duplicity for Cloud [...]
Is there any chance duplicity can be installed on cloudsites?
Any plans of making it available by default? It can be good for customers and good for cloudfiles revenue as this will push the cloudfiles usage to a new level.