Created
February 9, 2018 11:38
-
-
Save huettern/05884588720c80f287fb55233d69a50b to your computer and use it in GitHub Desktop.
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 | |
# 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