memento-tergum/b2mount.sh

19 lines
470 B
Bash
Raw Permalink Normal View History

2020-04-08 15:09:44 -04:00
#!/bin/bash
. ${PWD}/config.txt
2020-04-08 15:09:44 -04:00
export B2_ACCOUNT_ID="$B2_ACCOUNT_ID"
export B2_ACCOUNT_KEY="$B2_ACCOUNT_KEY"
export RESTIC_REPOSITORY="$RESTIC_REPOSITORY"
export RESTIC_PASSWORD_FILE="$RESTIC_PASSWORD_FILE"
RESTOREDIR="$RESTORE_DIR"
mkdir -p $RESTOREDIR
/usr/bin/restic mount $RESTOREDIR &
echo "Backups mounted to $RESTOREDIR"
echo ""
echo "Run umount $RESTOREDIR when finished"
echo ""
for var in $(awk -F"=" '{print $1}' ${PWD}/config.txt); do
unset $var
done