Minecraft server save after power shut off

This is all new to me and a bit over my head, but how does the environment get saved? I recently moved the raspberry pi and the content in the world was lost. Would assume there was some mechanism automatically saving what is done in the world so that upon reboot you are able to rejoin without losing anything. Inventory seems to stay, but anything built is lost.

Hello @aprice welcome to our forums!

By “moved” I assume you just unplugged the Pi and connected it somewhere else. It is expected that a sudden/ungraceful shutdown of the server causes information to be lost.

Protecting it from power-losses would require you to add some sort of UPS that can signal the application when power has been removed. You’ll then be able to gracefully shutdown the server and avoid loosing data. There seems to be a discussion here on how to properly shutdown this type of server when used in a Docker container.

You can also interact with the creator of this example in the GH repo. Fee free to reach out to us again if you have any other questions.

Cheers,
Nico.

Thanks for the reply. Would the shutdown option in the balena dashboard help with a graceful shutdown?

It should, yes. Using the shutdown option in the dashboard will send a SIGTERM signal to the container and should gracefully shutdown the server.

1 Like

Thank you, that worked - and I assume the restart option in the dashboard will perform a similar function.

Glad it worked! Correct, the restart option will have a similar result.