diff --git a/README.md b/README.md index c3818bd..18232b6 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,8 @@ docker exec palworld-server backup This will create a backup at `/palworld/backups/` +The server will run a save before the backup if rcon is enabled. + ## 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/backup.sh b/scripts/backup.sh index 9cca792..82e75eb 100644 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -1,5 +1,9 @@ #!/bin/bash +if [ "${RCON_ENABLED}" = true ]; then + rcon-cli save +fi + DATE=$(date +"%Y-%m-%d_%H-%M-%S") FILE_PATH="/palworld/backups/palworld-save-${DATE}.tar.gz" cd /palworld/Pal/ || exit