duplicity: Encrypted bandwidth-efficient backup using the rsync algorithm

September 9th, 2007 edited by ana

Entry submitted by Vincent Fourmond. DPOTD needs your help, please contribute!

I’ve recently grown paranoid about my data, and I keep using rsync to keep backup of various files a bit everywhere. It works great for most of the things I use, but it lacks fundamental things you would want from a real backup system, such as the possibility to come back to an earlier state.

So I went looking for something else, and I found that duplicity shows somehow the same syntax and ease of use than rsync: there is no need to write a configuration file, and it uses a very similar way to specify sources and targets. It features among others:

  • incremental backup
  • uses librsync to backup only what is necessary
  • distant scp-like access
  • no need to install duplicity on remote machine, just a scp server should do
  • GPG encryption and signature to protect data saved on a not-so-trusted host

To use it, just run something like:

duplicity data scp://vincent@server/saves

Or, for local file backup:

duplicity data file:///var/backup/data

The target directory must exist: duplicity does not create it for you. If you don’t plan to use GPG encryption, be sure to add –no-encryption to the command-line. Here is duplicity in full action:

11:58 vincent@server ~ duplicity --no-encryption Data file:///home/vincent/saves
No signatures found, switching to full backup.
--------------[ Backup Statistics ]————–
StartTime 1187949557.65 (Fri Aug 24 11:59:17 2007)
EndTime 1187949577.54 (Fri Aug 24 11:59:37 2007)
ElapsedTime 19.88 (19.88 seconds)
SourceFiles 3869
SourceFileSize 107865956 (103 MB)
NewFiles 3869
NewFileSize 107865956 (103 MB)
DeletedFiles 0
ChangedFiles 0
ChangedFileSize 0 (0 bytes)
ChangedDeltaSize 0 (0 bytes)
DeltaEntries 3869
RawDeltaSize 106836592 (102 MB)
TotalDestinationSizeChange 26514785 (25.3 MB)
Errors 0

duplicity was already part of Debian Sarge and Ubuntu Dapper. Development seems still alive, even though there are some bugs still at large.

Posted in Debian, Ubuntu |

11 Responses

  1. Tero Miettinen Says:

    Can anyone tell me how this differs from rdiff-backup?

  2. Vincent Fourmond Says:

    I’d say the main interest is seamless GPG encryption/signing, so you can backup your data on untrusted hosts

  3. dAniel hAhler Says:

    Duplicity has been sponsored by and there have been a lot of bug fixes and patches been added.
    The result was a new stable release 4.3, where most of the bugs should have been gone.
    Version 0.4.3 is not yet available in Debian or Ubuntu.

  4. Marius Scurtescu Says:

    Another difference from rdiff-backup is probably the fact that duplicity can backup to ftp, webdav, s3, etc.

    Look at the last feature:

  5. Shai Says:

    How does this relate to rsyncrypto?

  6. Richard Says:

    Good article about Duplicity for a backup server at - however, it turns out duplicity doesn’t support hard links so it’s a non-starter for full-OS backup, and some data directories.

    I’m currently using DAR - has some nice features, including incremental or differential backups, per-file compression (so you can easily seek within file, and a single disk block error should mean you lose only one file, typically), and it has a handy GUI (KDAR for KDE) to help you get going.

    With this, GPG and rsync I should have the equivalent of duplicity, with full hard links etc.

  7. bob Says:

    What advantages does duplicity provide over rsnapshot?

  8. Dov Sugarman Says:

    I wanted to let you know about a cool new backup program that offers FREE, UNLIMITED backup.

    With Zoogmo you control where your files are backed up by building a backup network of your own or your friends’ computers.

    Zoogmo automatically backs up ALL of your data over the internet, using a combination of Triple-DES and AES 256 encryption to make sure that only you have access to your files.

    Check out Zoogmo at to learn more and begin turning your social network into your backup network.

    Remember, with Zoogmo you have no annoying monthly fees - totally free unlimited backup you can trust!

  9. vince Says:

    Sorry for interruptinr all that spam with a real comment, but how does this compare to unison, which is also packaged in debian?

  10. nick Says:

    Thanks to the shameless spam by obv, I shall never even consider using their services. Too bad, was in the market for some tbytes of offsite backup, too.

  11. Richard Says:

    Re Unison - this is quite similar to rsync but optimised for 2-way syncing, and generally better at doing that. Use rsync if you only need one way syncing.

    Neither unison or rsync are backup packages really, in that they don’t let you return to previous version of the files backed up. Duplicity seems to be a nice layer on top of rsync that adds some useful backup features as well as encryption. DAR is a non-rsync-based backup tool that also has some nice features including incremental backup, encryption, single-file-compression (more resilient to bad blocks), etc.

    What would be really good is a review of various open source backup and sync tools for Linux.