diff --git a/restic_command.sh b/restic_command.sh deleted file mode 100755 index 61af26f..0000000 --- a/restic_command.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -set -e - -SCRIPT_DIR=$(readlink -f $(dirname "${BASH_SOURCE[0]}")) -REPO_DIR=$(dirname $SCRIPT_DIR) - -ENV_FILE=$REPO_DIR/.env -echo "Reading env variables from $ENV_FILE" -source $ENV_FILE - -if [ -z "$DATA_DIR" ]; then - echo "Error: DATA_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 - -docker run -it --rm \ ---hostname $HOSTNAME \ ---env-file $ENV_FILE \ --v /etc/localtime:/etc/localtime:ro \ --v /etc/timezone:/etc/timezone:ro \ --v $DATA_DIR:/data \ --v $RESTIC_REPOSITORY:$RESTIC_REPOSITORY \ -restic/restic:latest "$@" diff --git a/restic_prune.sh b/restic_prune.sh deleted file mode 100755 index be85fbe..0000000 --- a/restic_prune.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -SCRIPT_DIR=$(readlink -f $(dirname "${BASH_SOURCE[0]}")) - -$SCRIPT_DIR/restic_command.sh forget --prune \ ---keep-last 5 \ ---keep-hourly 72 \ ---keep-daily 14 \ ---keep-weekly 8 \ ---keep-monthly 12 \ ---keep-yearly 7 diff --git a/restic_restore.sh b/restic_restore.sh deleted file mode 100755 index a591857..0000000 --- a/restic_restore.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -SCRIPT_DIR=$(readlink -f $(dirname "${BASH_SOURCE[0]}")) -COMPOSE_FILE=$SCRIPT_DIR/docker-compose.yml - -echo "Stopping containers" -docker compose -f $COMPOSE_FILE stop 2>/dev/null - -SNAPSHOT_ID=${1:-latest} -$SCRIPT_DIR/restic_command.sh --verbose restore $SNAPSHOT_ID:/data --target /data - -echo "Executing compose up" -docker compose -f $COMPOSE_FILE up -d 2>/dev/null -echo "Done" \ No newline at end of file