Created
March 11, 2012 11:57
-
-
Save ruflin/2016178 to your computer and use it in GitHub Desktop.
Backup mit Duplicity auf S3
This file contains hidden or 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 | |
# Set ENV variables | |
export AWS_ACCESS_KEY_ID=YOUR_AWS_ID | |
export AWS_SECRET_ACCESS_KEY=YOUR_AWS_KEY | |
export PASSPHRASE="yourpassphrase" | |
# DEST and PARMS setup | |
DEST=s3+http://your.bucket.com/possible-sub-folder | |
PARAMS="--s3-european-buckets --s3-use-new-style --full-if-older-than 2W" | |
# Start backups | |
SOURCE=/var/www | |
duplicity ${PARAMS} ${SOURCE} ${DEST}${SOURCE} | |
duplicity remove-older-than 1M ${DEST}${SOURCE} | |
SOURCE=/other/path | |
duplicity ${PARAMS} ${SOURCE} ${DEST}${SOURCE} | |
duplicity remove-older-than 1M ${DEST}${SOURCE} | |
# Reset the ENV variables | |
export AWS_ACCESS_KEY_ID= | |
export AWS_SECRET_ACCESS_KEY= | |
export PASSPHRASE= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment