brianmiller / phvalheim-server

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

Is it possible to migrate from a previous docker install #31

Closed hammondses closed 4 months ago

hammondses commented 1 year ago

Just wondering if it's possible to migrate a backup from a previous valheim docker installation to this one?

Thanks!

brianmiller commented 1 year ago

It's possible. This isn't a major feature of PhValheim, but I also wanted one for myself. You'll likely need to make a few adjustments with your specifics, but the tool works. It works via SCP and local paths.

It's already part of the docker image located at "/opt/stateless/games/valheim/scripts/importWorld.sh" within the container itself.

Here's the GitHub link as well, if you'd like to read through it: https://github.com/brianmiller/phvalheim-server/blob/master/container/games/valheim/scripts/importWorld.sh

I've used this script to import 26 worlds without issue. All of my originating containers that I migrated from were running on ICH777's container:

image

hammondses commented 1 year ago

Oh great! The next issue is that my existing worlds all have a space in them which phvalheim doesn't seem to like, is there a simple way to fix that?

brianmiller commented 1 year ago

Issue #4 tracks the spaces in world name problem.

I honestly haven't had the time to test and discover yet.

I'll need to understand the specifics before I can comment too much further. I'll do what I can to prioritize this issue.

wwray commented 11 months ago

I've been trying to get this script to work for the past few days without success. It finds the world, adds it to the database and works to create the world, but it is always a brand new world without the data. I am importing from ich777 container as well. Even when I move the world in myself it overwrites it and starts a new world with the existing seed. I'm not sure how to troubleshoot this but it's too bad because this is a great project but I suspect many peoples use cases will be consolidating worlds into one container. I'm not a programmer so can't help with the code but happy to work with you on troubleshooting if you like.

Thanks!

wwray commented 11 months ago

Further to this, I did end up getting it working. I found that you had to have the prefs file in the folder and you can move the db and fwl files over manually immediately after the script finishes. Thanks again for all your hard work.