removing obsolete files

This commit is contained in:
John Lancaster
2024-05-27 00:56:11 -05:00
parent 3e2c4ea5c9
commit dde180c02b
3 changed files with 0 additions and 59 deletions

View File

@@ -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 "$@"

View File

@@ -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

View File

@@ -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"