From 296f2764caa7f4a5a88ddce2748b8335ba20e5b6 Mon Sep 17 00:00:00 2001 From: CeciliaKelley33Mm Date: Thu, 10 Oct 2024 08:42:12 +0700 Subject: [PATCH] finally add `toBackup` instead of archiving only `minecraft` --- .github/workflows/runglobal.yml | 6 +++--- loop.sh | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/runglobal.yml b/.github/workflows/runglobal.yml index 9b95470..d90bedb 100644 --- a/.github/workflows/runglobal.yml +++ b/.github/workflows/runglobal.yml @@ -83,10 +83,10 @@ jobs: tar xf archive.tar.gz rm -rf archive.tar.gz - cd minecraft + cd toBackup/minecraft else - mkdir /mnt/globalData/minecraft - cd /mnt/globalData/minecraft + mkdir -p /mnt/globalData/toBackup/minecraft + cd /mnt/globalData/toBackup/minecraft wget -O docker-compose.yml https://raw.githubusercontent.com/CeciliaKelley33Mm/global/refs/heads/master/minecraft-compose.yml fi docker compose up -d & diff --git a/loop.sh b/loop.sh index 378870d..d7d90b7 100755 --- a/loop.sh +++ b/loop.sh @@ -105,7 +105,7 @@ check() { if [[ "$IS_GLOBAL" == "true" ]]; then command+="-f \"inputs[oldTailscaleHostname]=$hostname\"" - cd /mnt/globalData/minecraft + cd /mnt/globalData/toBackup/minecraft timeLeft=30 @@ -120,13 +120,14 @@ check() { done # not stopping the server would cause problems - # like world files aren't latest or even file corruptions + # like new world files not getting written + # or even file corruptions docker compose down cd /mnt/globalData # sudo is necessary because we run minecraft in a docker container - sudo tar cf archive.tar.gz minecraft/ + sudo tar cf archive.tar.gz toBackup/ serve -p 5000 & fi