From 2707fc5525bb0e6e68a8ec31e262bf2be0b7b060 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Wed, 24 Jan 2024 12:52:48 +0100 Subject: [PATCH] Rename dump save to backup & add to readme --- Dockerfile | 4 ++-- README.md | 6 ++++-- scripts/{dump_save.sh => backup.sh} | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) rename scripts/{dump_save.sh => backup.sh} (53%) diff --git a/Dockerfile b/Dockerfile index ce405ac..5978229 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,9 +28,9 @@ ENV PORT= \ QUERY_PORT=27015 COPY ./scripts/* /home/steam/server/ -RUN chmod +x /home/steam/server/init.sh /home/steam/server/start.sh /home/steam/server/dump_save.sh +RUN chmod +x /home/steam/server/init.sh /home/steam/server/start.sh /home/steam/server/backup.sh -RUN mv /home/steam/server/dump_save.sh /usr/local/bin/dump_save +RUN mv /home/steam/server/backup.sh /usr/local/bin/backup WORKDIR /home/steam/server diff --git a/README.md b/README.md index 308aa86..612f6a4 100644 --- a/README.md +++ b/README.md @@ -152,14 +152,16 @@ This will open a CLI that use can use to write commands to the Palworld Server. For a full list of commands go to: [https://tech.palworldgame.com/server-commands](https://tech.palworldgame.com/server-commands) -## Dump Save +## Creating a backup To create a backup of the game's save at the current point in time, use the command. ```bash -docker exec palworld-server dump_save +docker exec palworld-server backup ``` +This will create a backup at `/palworld/backups/` + ## Editing Server Settings When the server starts, a `PalWorldSettings.ini` file will be created in the following location: `/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini` diff --git a/scripts/dump_save.sh b/scripts/backup.sh similarity index 53% rename from scripts/dump_save.sh rename to scripts/backup.sh index b4d5568..9cca792 100644 --- a/scripts/dump_save.sh +++ b/scripts/backup.sh @@ -2,7 +2,7 @@ DATE=$(date +"%Y-%m-%d_%H-%M-%S") FILE_PATH="/palworld/backups/palworld-save-${DATE}.tar.gz" -cd /palworld/Pal/ +cd /palworld/Pal/ || exit -tar -zcf $FILE_PATH "Saved/" -echo "file dumped at $FILE_PATH" +tar -zcf "$FILE_PATH" "Saved/" +echo "backup created at $FILE_PATH"