Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/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