diff --git a/usr/local/bin/sh.zio.backup b/usr/local/bin/sh.zio.backup index 6ede740..cdfbc9c 100755 --- a/usr/local/bin/sh.zio.backup +++ b/usr/local/bin/sh.zio.backup @@ -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() {