This commit is contained in:
John Lancaster
2024-02-19 23:10:02 -06:00
parent 3c89fe22bc
commit b368cede93
6 changed files with 153 additions and 35 deletions

18
run.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
SCRIPT_DIR=$(readlink -f $(dirname "${BASH_SOURCE[0]}"))
COMPOSE_FILE=$SCRIPT_DIR/docker-compose.yml
echo "Retic repo: $RESTIC_REPOSITORY"
# docker compose -f $COMPOSE_FILE \
# run -it --rm backup backup --json "$@" | \
# sed 's/^[^{]*//' | \
# jq 'select(.message_type != "status")'
PROJECT_NAME=$1
shift
docker compose --project-name $PROJECT_NAME stop
docker compose -f $COMPOSE_FILE run -it --rm restic backup --verbose "$@"
docker compose --project-name $PROJECT_NAME start