The bug
While auto-save is turned off (/save-off
command), the server still saves the inventories and position of players and ender chests, as well as the world and chest inventories. When the server is stopped, player positions and the world are saved.
How to reproduce
Start your SMP server
Run the
/save-off
commandMove around, edit the world, place items in your chests and ender chests
Stop the server with the
/stop
commandReboot the server normally
→ Your position and items in your inventory, as well as your changes to the world, remain
Linked issues
Comments 15
Some more detail.
On save-off the player.dat files continue to be written. As a result, doing a backup will result in player files (player inventory, ender chests, position, ...) to be out of sync with the world region files. This can lead to items disappearing or duplicated items on server restore.
I would also be grateful for a any info on a workaround until this can be addressed.
Thank you. Sorry for being a bit edgy, this bug almost made me lose several hours of game play on a server I manage, Good backup routines saved the day, though I'm going to be very careful about save-off in the future.
Wot, I posted this on another issue.
@unknown I must disagree.
/stop, SIGINT(Ctrl-C) and SIGTERM need to save the world or people will lose changes.
Don't force people to go through this. There is no need to.
@unknown If you don't want to stop your server without saving your changes, use SIGKILL(forcekill).
This causes the OS to simply remove the server from memory without giving it a chance to save the map.
That being said, this is a narrow special case which should not endanger the maps of the 99% of players who want their changes saved.
Re: Stabel, this is confusing.
Most players who want their changes saved will not invoke /save-off, except in the course of a backup. If they forget to re-enable saving then...the backup process is doing it wrong and already jeopardizing loss of data given there are tons of ways that a process can be killed. It seems like you're advocating for a safety net in case these kinds of processes are not tidying up as they should be? But consider a backup that hasn't turned saving back on and the following circumstances...
host machine is rebooted
host machine loses power
etc, etc
These are the equivalent of a SIGKILL, and will be problems for backups no matter what. Backup processes should do the right commands.
It's not good form to have another command having magic, undocumented functionality to guard against behavior like forgetting to turn saving back on. At the very least, the documentation for /save-off should be amended.
Best? /save-off works as described and has no side-effects. There's actual use cases for this like running a pvp day on a server that is normally pve and letting people go wild on each other's creations or loading up special mods for an event day that no one wants persisted to disk.
I shouldn't have to login to my host (which I may not have access to a shell to do) and send a SIGKILL. Instances where someone may not have access are due to hosting provider or someone is an operator level 4 but doesn't have shell access to the host.
As someone managing a cloud VPS for a server, I would /never/ give shell access to anyone but myself, period, but I do want to allow other operators who might be throwing events while I'm unavailable, etc to do the above.
Confirmed for 1.5.1-pre server with 1.5.1-pre client.
World edits and chests of all types are disappearing. Player position and inventory gets saved, contents of Enderchest gets saved, too (if you place a new Enderchest you get all the items you put in it the last time).