Skip to content

Instantly share code, notes, and snippets.

@huettern
Created February 9, 2018 11:38
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 huettern/05884588720c80f287fb55233d69a50b to your computer and use it in GitHub Desktop.
Save huettern/05884588720c80f287fb55233d69a50b to your computer and use it in GitHub Desktop.
#!/bin/bash
# GPG Key to use for data encryption
KEY_ID=3387FFED
# Host
HOST=`cat /var/services/homes/outpost/outpost_ip.txt`
USER=pi
# Check for input arguments
if [ $# -ne 2 ]
then
echo "Not enough input arguments"
echo "Usage: ./outpost_recover.sh BACKUP_DST RECOVER_DST"
exit -1
fi
# Recover command
BACKUP_DST=$HOSTNAME/$1
RECOVER_DST=$2
duplicity --verbosity 5 --progress --gpg-binary=/usr/local/gnupg/bin/gpg2 --encrypt-key $KEY_ID rsync://$USER@$HOST/$BACKUP_DST $RECOVER_DST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment