Home > Linux > Backup using duplicity to S3

Backup using duplicity to S3

Most of what’s needed to backup a linux box to S3 is covered in

http://www.brainonfire.net/2007/08/11/remote-encrypted-backup-duplicity-amazon-s3/

The good news:

  • Simple setup (see below)
  • Cheap backup
  • Encrypted backup. Even if someone manages to get to your data on s3, they still won’t be able to do anything with it.

Worked like a charm on my laptop, but I had many issues on my home server.

It took me quite a while to realize that the version of duplicity I had on ubuntu feisty doesn’t support s3 backup and I need to download the product from http://duplicity.nongnu.org/ rather than use the package.

The second issue is that I did the initial backup of the laptop at work where we have multiple T3s. At home I have a connection that’s 3M download 512K upload. That translates to 200M/hour 5Gig/Day backup, which means that the initial backup is going to be slow, and will slow down your connection to a crawl.

Also, duplicity doesn’t support a resume feature. So if your backup fails at some point, next time you run the script it’ll start from scratch and backup everything.

  #your pgp secret to encrypt your data
export PASSPHRASE=xxxxxxxxx

#S3 info
export AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxxx
export AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

echo "backing up /etc"
duplicity /etc s3+http://drormata-e1705-etc

#Notice how you can exclude certain things
echo "backing up /home"
duplicity ---exclude=/home/dror/.mozilla/firefox/54y9nzlg.default/Cache --exclude=/home/dror/tmp --exclude=/home/dror/.opera --exclude=/home/dror/.thumbnails --exclude=/home/dror/download --exclu
de=/home/dror/apps /home/dror s3+http://yourbucket
Advertisements
Categories: Linux Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: