Skip to content

Instantly share code, notes, and snippets.

@jahands
Created December 18, 2016 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jahands/51fbc4752a3a4f6f5a2ae103b4b8da4e to your computer and use it in GitHub Desktop.
Save jahands/51fbc4752a3a4f6f5a2ae103b4b8da4e to your computer and use it in GitHub Desktop.
Backup your /home to B2
#!/bin/bash
if [ -f ~/.bash_secrets ]; then
. ~/.bash_secrets
fi
duplicity $1 --no-encryption \
--include '/home/*/.dotfiles' \
--exclude '/home/*/.*' \
--exclude '/home/*/Downloads' \
--exclude '/home/*/.ecryptfs' \
/home/ \
b2://${B2_ID}:${B2_KEY}@jh-backup-$(hostname)/
alias dpfull-backup='~/.dotfiles/scripts/duplicity-backup.sh full'
alias dpincr-backup='~/.dotfiles/scripts/duplicity-backup.sh incr'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment