2
0
Fork 0

sh.zio.backup: add message for rescue

main
Ducky 2023-08-22 22:12:03 +01:00
parent 82c29111d8
commit 288c84b72e
1 changed files with 4 additions and 1 deletions

View File

@ -295,11 +295,14 @@ if [[ -z "$1" || -f "$1" ]]; then
| sed -E ":begin;$!N;s/$(basename "$0")\n\s+?//;tbegin;P;D"
elif [[ "$1" == "rescue" ]]; then
snapshot="$2"
rescue_dir="/srv/dumps/$host/restic/$snapshot"
[[ -z "$snapshot" ]] && die "No snapshot ID provided"
say info "Rescuing: $snapshot (to '$rescue_dir')"
invoke_restic restore \
--target "/srv/dumps/$host/restic/$snapshot" \
--target "$rescue_dir" \
"$snapshot"
elif [[ "$1" == "toggle-mount" ]]; then
function test_restic_mount() {