Backup using duplicity to S3
Most of what’s needed to backup a linux box to S3 is covered in
- Install duplicity
- Download boto from http://code.google.com/p/boto/
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