diff --git a/bin/backup-restic b/bin/backup-restic index d9333fa..cb9397b 100755 --- a/bin/backup-restic +++ b/bin/backup-restic @@ -23,7 +23,14 @@ fi PROFILE=$1 shift + PROFILE_ROOT=$CONFIG_ROOT/$PROFILE + +if [ ! -d "$PROFILE_ROOT" ] ; then + echo "Profile '$PROFILE' not found in $CONFIG_ROOT" + exit 2 +fi + export RESTIC_PASSWORD_COMMAND="pass restic/$PROFILE/$HOSTNAME" CMDLINE="restic backup --one-file-system --exclude-caches $DRY"