bugzilla/scripts/vm/restore.sh
Tiara Rodney 883f31932e
init
2026-03-14 05:38:45 +01:00

20 lines
466 B
Bash
Executable file

#!/bin/sh
# Restore both VM volumes to a snapshot and start them.
#
# Usage: scripts/vm/restore.sh <label>
# e.g. scripts/vm/restore.sh initialized
set -eu
. "$(dirname "$0")/env.sh"
label="${1:?Usage: restore.sh <label>}"
"$(dirname "$0")/stop.sh"
echo "==> Restoring '$label'"
"$QEMU_VM" volume restore "$PROXY_VM" "$label"
"$QEMU_VM" volume restore "$IDP_VM" "$label"
echo "==> Clearing stale SSH host keys"
clear_host_keys
exec "$(dirname "$0")/start.sh"