lloesche / valheim-server-docker

Valheim dedicated gameserver with automatic update, World backup, BepInEx and ValheimPlus mod support
https://hub.docker.com/r/lloesche/valheim-server
Apache License 2.0
1.94k stars 272 forks source link

backup script no longer working since patch 0.209.8 #487

Closed galinette-34 closed 2 years ago

galinette-34 commented 2 years ago

Valheim Patch 0.209.8 introduced a new directory /config/worlds_local to store the world files and no longer use the old directory /config/worlds.

Scripts /usr/local/bin/valheim-backup and /usr/local/etc/valheim/common need an update.

manuman94 commented 2 years ago

Plus, when the server is auto-updated and auto-restarted creates a new world in "worlds_local" folder not respecting the original world.

manuman94 commented 2 years ago

Note from Irongate Studios regarding the latest patch: https://store.steampowered.com/news/app/892970/view/6128850732740078767

Dedicated-server world loading fix. This patch fixes the world load issue introduced in 0.209.8, causing dedicated servers to fail to load worlds saved in the now legacy “worlds/” directory (and instead creating a new empty world) Unfortunately if you already got a world-reset caused by this, try removing the broken world from "worlds_local/" (but don’t touch “worlds/” ). This will make the server load the original working world from “worlds/” instead. Shit happens 😦 sorry

This is why is happening what I said in my latest comment.

galinette-34 commented 2 years ago

Plus, when the server is auto-updated and auto-restarted creates a new world in "worlds_local" folder not respecting the original world.

Iron Gate just updated it in Patch 0.209.9: https://store.steampowered.com/news/app/892970/view/6128850732740078767

Duplicated comment, sorry. manuman94 was faster ;-)

manuman94 commented 2 years ago

haha @galinette-34 thanks for the info!

So my fix was the one proposed by Irongate and it worked (by stopping the server, deleting the "worlds_local" folder and restarting the server).

So there is no need to fix the world path for us. But maybe new server installations will start using the "worlds_local" folder and need to patch the backup system to backup that one.

Maybe the schema is "if worlds_local exist, backup that folder, else backup the classic worlds folder".

Thank you all! ;)

Toblun commented 2 years ago

Patch 0.209.9 dont fix this issue it just copy the save from worlds to worlds_local at server start if no save exist in worlds_local. The backup script still just backup the old save in worlds

bewczardski commented 2 years ago

There is a pull request to solve this issue: https://github.com/lloesche/valheim-server-docker/pull/490

lloesche commented 2 years ago

The PR has been merged, please see if this fixes the issue! ty!

Alth3r commented 2 years ago

On my end the backup script is still looking for a worlds folder. The backups are empty.

lloesche commented 2 years ago

On my end the backup script is still looking for a worlds folder. The backups are empty.

  • When the worlds are mounted to the worlds directory then backups are made correctly (world is not loaded for playing).
  • When the worlds are mounted to the worlds_local directory then backups are empty (world is loaded for playing).

Did you update the container? As in docker pull the latest version.

Alth3r commented 2 years ago

I am using docker-compose. I have used docker-compose up --force-recreate to update the container.

galinette-34 commented 2 years ago

docker-compose up --force-recreate only recreate the container without updating the used image (lloesche/valheim-server)

you first need to update image, with docker pull lloesche/valheim-server or docker compose pull, before to recreate container.

docker images --digests should then list: lloesche/valheim-server latest sha256:8d910b15e3ab645a31c85799338d3dc043cabe891a34b43cbd574a1453837205 this is the digest of the last and corrected version.

Alth3r commented 2 years ago

Jap. I'm dumb. After pulling the new image the backup script works as expected. Thank you :)

galinette-34 commented 2 years ago

Thanks everyone!