add script to backup and then unprovision server
This commit is contained in:
parent
3237932fd9
commit
c8cfc346bb
1 changed files with 8 additions and 0 deletions
8
undeploy.sh
Executable file
8
undeploy.sh
Executable 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
|
Loading…
Add table
Reference in a new issue