Created
October 9, 2008 20:59
-
-
Save olly/15890 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Export some ENV variables so you don't have to type anything | |
export AWS_ACCESS_KEY_ID=<your-access-key-id> | |
export AWS_SECRET_ACCESS_KEY=<your-secret-access-key> | |
export PASSPHRASE=<your-gpg-passphrase> | |
GPG_KEY=<your-gpg-key> | |
# The source of your backup | |
SOURCE=/ | |
# The destination | |
# Note that the bucket need not exist | |
# but does need to be unique amongst all | |
# Amazon S3 users. So, choose wisely. | |
DEST=s3+http://51degrees_backup | |
duplicity \ | |
incremental \ | |
--full-if-older-than 1M \ | |
--encrypt-key ${GPG_KEY} \ | |
--sign-key ${GPG_KEY} \ | |
--include=/etc \ | |
--include=/home \ | |
--include=/root \ | |
--include=/srv \ | |
--exclude=/** \ | |
--volsize 250 \ | |
${SOURCE} ${DEST} | |
duplicity remove-older-than 6M --force ${DEST} | |
# Reset the ENV variables. Don't need them sitting around | |
export AWS_ACCESS_KEY_ID= | |
export AWS_SECRET_ACCESS_KEY= | |
export PASSPHRASE= |
I'm following your script, but am unable to make duplicity write to a pre-existing S3 bucket. The bucket is empty, if that makes any difference.
a little OT, but how can you estimate the costs of S3 storage with Duplicity? Other than the space itself, how much does the GET/PUT performed by the software weigh? thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very helpful script! If I might suggest, after line 28, you could add the following:
and allow users to comment/uncomment it out to disable/enable Reduced Redundancy Storage, if they so choose.