updates to make better use of restic-scripts
This commit is contained in:
24
scripts/backup.sh
Executable file
24
scripts/backup.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ -z "$BACKUP_DIR" ]; then
|
||||
echo "Error: BACKUP_DIR is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$RESTIC_REPOSITORY" ]; then
|
||||
echo "Error: RESTIC_REPOSITORY is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$RESTIC_PASSWORD" ]; then
|
||||
echo "Error: RESTIC_PASSWORD is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
python -m restic.backup --project zigbee-stack --services mqtt,z2m "$@"
|
||||
|
||||
SCRIPT_DIR=$(readlink -f $(dirname "${BASH_SOURCE[0]}"))
|
||||
|
||||
$SCRIPT_DIR/prune_backups.sh
|
||||
Reference in New Issue
Block a user