thijsvanloef / palworld-server-docker

A Docker Container to easily run a Palworld dedicated server.
https://hub.docker.com/r/thijsvanloef/palworld-server-docker
MIT License
2.43k stars 295 forks source link

Support migrate from existing data #96

Closed Ericwww closed 9 months ago

Ericwww commented 9 months ago

Thank you for providing the docker image and compose file.

I migrated my existing server to use docker deployment today. Recovering from existing data requires some manual operations. I think this operation can be integrated into the docker image to facilitate users to migrate servers.

I saw a migration solution from a game forum in China like this:

cp -r oldServer:steamapps/common/PalServer/Pal/Saved/SaveGames/0/{SERVER_NAME}/ newServer:steamapps/common/PalServer/Pal/Saved/SaveGames/0/{SERVER_NAME}/

And then

sed -i "s/DedicatedServerName=[A-Z0-9]*/DedicatedServerName={SERVER_NAME}/" /palworld/Pal/Saved/Config/LinuxServer/GameUserSettings.ini

Now I'm not sure if the GameUserSettings.ini file is generated before starting the game server. If so this problem would be much simpler. If not, I have no idea how to solve this problem.

I can't test it because I'm with Apple Silicon.

If anyone has ideas, welcome to discuss.

Jortana commented 9 months ago

I used to run the server directly on Windows, but later I migrated it to a Docker environment.

My approach was to first enter the new server and create a character, in order to let my new server generate some necessary files.

Then, I would change the DedicatedServerName in the GameUserSettings.ini file of the new server. Also, I deleted the steamapps/common/PalServer/Pal/Saved/SaveGames/0/{SERVER_NAME}/ folder in the new server and replace it with the folder from the old server.

By doing this and restarting the server, All players could play normally.