openmind ☃   January 09, 2008  ☃  Encrypted Incremental Backups with Duplicity and Amazon S3  (, , )

The title pretty much sums it up.

#!/bin/bash

export AWS_ACCESS_KEY_ID=''
export AWS_SECRET_ACCESS_KEY=''
export PASSPHRASE=''
DIRS=(/dir/one /dir/two /dir/three)

for dir in "${DIRS[@]}"
do
  echo "Backing up $dir"
  /usr/bin/duplicity\
  --verbosity=9\
  --encrypt-key=22660FC3\
  --sign-key=22660FC3\
  $dir\
  s3+http://<bucket>/backups/$dir
done

This will create encrypted, signed backups that can be restored via:

duplicity s3+http//<bucket>/backups/$dir $dir

blog comments powered by Disqus