sh.zio.backup: add message for rescue
parent
82c29111d8
commit
288c84b72e
usr/local/bin
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue