-
-
Save manur/1661059 to your computer and use it in GitHub Desktop.
Duplicity Backup Script
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 | |
# 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, by default the home directory | |
SOURCE=$HOME | |
# 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://some-bucket-name-on-s3/some-path-to-your-backup | |
duplicity \ | |
incremental \ | |
--encrypt-key ${GPG_KEY} \ | |
--sign-key ${GPG_KEY} \ | |
--include=$HOME \ | |
--exclude=$HOME/Films \ | |
--exclude=$HOME/Downloads \ | |
--exclude="$HOME/VirtualBox VMs" \ | |
--exclude=/** \ | |
--volsize 250 \ | |
${SOURCE} ${DEST} | |
# Reset the ENV variables. Don't need them sitting around | |
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