dotfiles/bin/bin/restic.sh
2022-05-12 15:42:39 -04:00

15 lines
392 B
Bash
Executable File

#!/usr/bin/env bash
if ! command -v restic &> /dev/null
then
echo "restic not installed"
exit
fi
export AWS_ACCESS_KEY_ID="$(pass jdormit-infra-spaces-access-id)"
export AWS_SECRET_ACCESS_KEY="$(pass jdormit-infra-spaces-secret-key)"
export RESTIC_PASSWORD="$(pass restic-jdormit-backup-spaces)"
export RESTIC_REPOSITORY="s3:nyc3.digitaloceanspaces.com/jdormit-backup"
restic "$@"