humble-homelab/scripts/restore-latest-backup.sh
2024-01-18 21:29:44 +01:00

12 lines
382 B
Bash
Executable file

#!/bin/env bash
# Source: https://stackoverflow.com/a/4774063
PROJECT_ROOT="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )/.."
rm -rf "$PROJECT_ROOT/backup-restore"
"$PROJECT_ROOT/scripts/restic.sh" restore latest --target "$PROJECT_ROOT/backup-restore"
(cd "$PROJECT_ROOT/backup-restore/tmp" && unzip forgejo.zip -d ../forgejo)
rm -rf "$PROJECT_ROOT/backup-restore/tmp"