Hi, when I restart the server I tend to lose a lot of my progress in the game. My character still has their gear and level, but some of the structures I have built are lost. Any ideas?
Do you have a crontab set up to backup/restore the servers files? It sounds like only the “world” files are changing but not the “playerdata” files. Hence the reason why the gear remains.
Check other servers and/or external packages you may have added to the box.
How are you restarting the server, specifically?
Minecraft saves playerdata and world data differently, and with different triggers as @fornaxbeowulf stated.
world data is saved when 1) the chunk is unloaded from memory to make space available for other chunks, 2) the server is stopped gracefully, and 3) when save-all
occurs.
player data saved when 1) the user disconnects (gracefully or not gracefully), 2) the server is stopped, but I’m not certain any other triggers.
Your situation where you lose world progress but players are still keeping gear and level suggest the server is being stopped non-gracefully. An example:
- log into world
- build a building
- log out player, immediately
- kill server, immediately (not stop)
This kind of scenario would result in:
- building not being there
- player level retained, inventory items absent
Second example:
- log into world
- build a building
- log out player, immediately
save-all
- kill server, immediately (not stop)
This kind of scenario would result in:
- building there
- player level retained, inventory items absent (as expected)
All this is on the assumption this is a vanilla server. Naturally, there are mods that can modify the normal workflow, but then I’d need to know that to see its impact.
In short, I recommend you increase the save-all
frequency within the webui. If you’re restarting the server regularly, be sure to always stop
rather than kill
. And if you do have a crontab for backup restore, consider whether an automated restore (and lost progress) is an acceptable trade-off for when servers that do not gracefully close and save, first.