brianmiller / phvalheim-server

PhValheim backend server
GNU General Public License v2.0
26 stars 5 forks source link

Create world with existing save? #48

Open thefreymaster opened 7 months ago

thefreymaster commented 7 months ago

Is there a way to create a world, and use an existing world save with this server?

Tensuu commented 7 months ago

Or restore a world backup?

riotzor commented 7 months ago

@thefreymaster If you want to use an existing world with phvalheim, create a world in phvalheim with the same name as the world you want to restore. Launch the server for the first time so everything is created. Then stop the server and replace the world files located on your server with the copy of the world you want to restore.

I was able to get mine working this way. If you need more info then comment back.

@Tensuu Not sure on restoring from a backup but I think it would be similar to the above. Stop the server and then replace the current world files with the backup copies, making sure you rename the world files so that they match the ones you are replacing.

brianmiller commented 5 months ago

what @riotzor suggested will absolutely work. I also had a similar need a created an import script that may help you. It's internal to the container.

You can find it within the running phvalheim-server container: /opt/games/valheim/scripts/importWorld.sh

You can take a look at the script here: https://github.com/brianmiller/phvalheim-server/blob/master/container/games/valheim/scripts/importWorld.sh

I used this script to import 37 worlds from different containers. It works over SSH/SCP or local DAS. This script is something it quickly put together. It's not intended to be super portable or even something I want to support. :) But I'm happy to help when I can get a free minute.

The discord channels would probably be best: https://discord.gg/8RMMrJVQgy