add script to backup and then unprovision server

This commit is contained in:
ida schmidt 2025-03-31 16:05:03 +01:00
parent 3237932fd9
commit c8cfc346bb

8
undeploy.sh Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
install_dir="$(dirname "$(readlink -f "$0")")" # find the install directory
source "$install_dir/functions.sh"
data_dir get
machine show ipv4 | jq -r .ip_address | read ipv4_address
ssh root@$ipv4_address <<<mc-backup > "$data_dir/server.tar.zstd"
machine destroy