Skip to content

Commit

Permalink
Merge pull request thijsvanloef#86 from karnzx/main
Browse files Browse the repository at this point in the history
add dump save to backup game save
  • Loading branch information
thijsvanloef authored Jan 24, 2024
2 parents c4d3327 + 2707fc5 commit 94a73b5
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +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
RUN chmod +x /home/steam/server/init.sh /home/steam/server/start.sh /home/steam/server/backup.sh

RUN mv /home/steam/server/backup.sh /usr/local/bin/backup

WORKDIR /home/steam/server

Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +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)

## 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 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: `<mount_folder>/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini`
Expand Down
8 changes: 8 additions & 0 deletions scripts/backup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

DATE=$(date +"%Y-%m-%d_%H-%M-%S")
FILE_PATH="/palworld/backups/palworld-save-${DATE}.tar.gz"
cd /palworld/Pal/ || exit

tar -zcf "$FILE_PATH" "Saved/"
echo "backup created at $FILE_PATH"
2 changes: 1 addition & 1 deletion scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ else
exit 1
fi

mkdir -p /palworld
mkdir -p /palworld/backups
chown -R steam:steam /palworld

if [ "${UPDATE_ON_BOOT}" = true ]; then
Expand Down

0 comments on commit 94a73b5

Please sign in to comment.