Command /save-off does not turn off autosaving on server shutdown
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 command
- Move around, edit the world, place items in your chests and ender chests
- Stop the server with the /stop command
- Reboot the server normally
→ Your position and items in your inventory, as well as your changes to the world, remain
Linked Issues
Created Issue:
Auto-save off saving inventories
While auto-save is turned off (/save-off command), the server still saves the inventories and position of players and Enderchests, but does not save the world or chest inventories (as expected). When the server is stopped, player positions are saved while the world is not saved.
*What I expected was*
The server would not save any data until instructed to do so.*What actually happened was*
The server saved player data and did not save world data.*Steps to reproduce*
1. Start your SMP server
2. Run the /save-off command
3. Move around, edit the world, place items in your chests and Enderchests,
4. Stop the server with the /stop command
5. Reboot the server normally
Result: Your position and items in your inventory are the same, but your changes to the world are gone.Environment
SMP, vanilla client & server
While auto-save is turned off (/save-off command), the server still saves the inventories and position of players and Enderchests, but does not save the world or chest inventories (as expected). When the server is stopped, player positions are saved while the world is not saved.
*What I expected was*
The server would not save any data until instructed to do so.*What actually happened was*
The server saved player data and did not save world data.*Steps to reproduce*
1. Start your SMP server
2. Run the /save-off command
3. Move around, edit the world, place items in your chests and Enderchests,
4. Stop the server with the /stop command
5. Reboot the server normally
Result: Your position and items in your inventory are the same, but your changes to the world are gone.
is duplicated by
Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
This ticket is incomplete without the requested information, no response has been received within a reasonable time and we are assuming the issue has been resolved. If you are still experiencing this issue, we can reopen it at your request.
Auto-saveoffsaving inventories/save-off does not turn off autosaving
While auto-save is turned off (/save-off command), the server still saves the inventories and position of players and Enderchests,
but does not savethe worldorchest inventories(as expected). When the server is stopped, player positions are saved whilethe worldis notsaved.What I expected was
The server would not save any data until instructed to do so.What actually happened was
The server saved player data anddid not saveworld data.Steps to reproduce
1. Start your SMP server
2. Run the /save-off command
3. Move around, edit the world, place items in your chests and Enderchests,
4. Stop the server with the /stop command
5. Reboot the server normally
Result: Your position and items in your inventory are the same, butyour changes to the worldare gone.While auto-save is turned off (/save-off command), the server still saves the inventories and position of players and Enderchests, as well as the world and chest inventories. When the server is stopped, player positions and the world are saved.
What I expected was
The server would not save any data until instructed to do so.What actually happened was
The server saved player data and world data.Steps to reproduce
1. Start your SMP server
2. Run the /save-off command
3. Move around, edit the world, place items in your chests and Enderchests,
4. Stop the server with the /stop command
5. Reboot the server normally
Result: Your position and items in your inventory, as well as your changes to the world, remain.
While auto-save is turned off (/save-off command), the server still saves the inventories and position of players and Enderchests, as well as the world and chest inventories. When the server is stopped, player positions and the world are saved.
What I expected was
The server would not save any data until instructed to do so.What actually happened was
The server saved player data and world data.Steps to reproduce
1. Start your SMP server
2. Run the /save-off command
3. Move around, edit the world, place items in your chests and Enderchests,
4. Stop the server with the /stop command
5. Reboot the server normally
Result: Your position and items in your inventory, as well as your changes to the world, remain.While auto-save is turned off (/save-off command), the server still saves the inventories and position of players and Enderchests, as well as the world and chest inventories. When the server is stopped, player positions and the world are saved.
What I expected was
The server would not save any data until instructed to do so.What actually happened was
The server saved player data and world data.Steps to reproduce
- Start your SMP server
- Run the /save-off command
- Move around, edit the world, place items in your chests and Enderchests,
- Stop the server with the /stop command
- Reboot the server normally
Result: Your position and items in your inventory, as well as your changes to the world, remain.
While auto-save is turned off (/save-off command), the server still saves the inventories and position of players and
Enderchests, as well as the world and chest inventories. When the server is stopped, player positions and the world are saved.What I expected was
The server would not save any data until instructed to do so.What actually happened was
The server saved player data and world data.Steps to reproduce
- Start your SMP server
- Run the /save-off command
- Move around, edit the world, place items in your chests and
Enderchests,- Stop the server with the /stop command
- Reboot the server normally
Result: Your position and items in your inventory, as well as your changes to the world, remain.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.
What I expected was
The server would not save any data until instructed to do so.What actually happened was
The server saved player data and world data.To reproduce
- Start your SMP server
- Run the /save-off command
- Move around, edit the world, place items in your chests and ender chests
- Stop the server with the /stop command
- Reboot the server normally
Result: Your position and items in your inventory, as well as your changes to the world, remain.
The bug
While auto-save is turned off (/save-off command), the server still saves the inventories and position of players and
enderchests, as well as the world and chest inventories. When the server is stopped, player positions and the world are saved.What I
expectedwas
The server would not save any data until instructed to do so.What
actuallyhappenedwas
The server saved player data and world data.To reproduce
- Start your SMP server
- Run the /save-off command
- Move around, edit the world, place items in your chests and
enderchests- Stop the server with the /stop command
- Reboot the server normally
Result: Your position and items in your inventory, as well as your changes to the world, remain.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.What I Expected Was
The server would not save any data until instructed to do so.What Actually Happened Was
The server saved player data and world data.Steps To Reproduce
- Start your SMP server
- Run the /save-off command
- Move around, edit the world, place items in your chests and Ender Chests
- Stop the server with the /stop command
- Reboot the server normally
Result: Your position and items in your inventory, as well as your changes to the world, remain.
The Bug
While auto-save is turned off (/save-off command), the server still saves the inventories and position of players andEnderChests, as well as the world and chest inventories. When the server is stopped, player positions and the world are saved.What I Expected Was
The server would not save any data until instructed to do so.What Actually Happened Was
The server saved player data and world data.Steps To Reproduce
- Start your SMP server
- Run the /save-off command
- Move around, edit the world, place items in your chests and
EnderChests- Stop the server with the /stop command
- Reboot the server normally
Result:Your position and items in your inventory, as well as your changes to the world, remain.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 command
- Move around, edit the world, place items in your chests and ender chests
- Stop the server with the /stop command
- Reboot the server normally
→ Your position and items in your inventory, as well as your changes to the world, remain
Command /save-off does not turn off autosaving on server shutdown
relates to
Duplicate of MC-3208, please use the search function to see if your bug has already been submitted. Currently over 55% of tickets are being closed as duplicate.
Stopping a Minecraft server with the command /stop after the /save-off command has been executed cause the outstanding changes to the world to be discarded.
This can cause an unexpected and unrecoverable loss of data spanning anything from hours to weeks upon shutting down a server.
In combination with MC-3208 this behavior causes the world state to become corrupt in addition to the data loss.
Steps to reproduce
- Start a Minecraft server
- Execute /save-off
- Make changes to the world. (i.e, place some blocks)
- Stop the server with /stop, and start it up again
- Observe that the changes made has been discarded
Expected behavior
When stopping, the Minecraft server would save the world to disk, regardless of state of save-on/save-off.
What actually happened
The changes to the world was discarded.
In servers, save-off does not disable autosaving and autosaves continue to happen at 5 minute intervals. This is catastrophic for backup scripts which have no choice but to rely on the save-off functionality to capture a consistent world state.
Steps to reproduce:
- Launch a new Minecraft server and wait for the world to generate
- Run save-off in the console and note the time
- Wait 5 minutes
- Notice that the file modify time for world/level.dat is a time after the time save-off was run and continues to be updated every 5 minutes
This is different from MC-4417 because the autosave continues happening, even occurring multiple times after the save-off command is run. This is not simply an issue of waiting for a single save to finish.
This is different from MC-3208 because this has nothing to do with the /stop command.
Re: Mark Derickson
I disagree. In MC-3208 it says: "When the server is stopped, player positions and the world are saved." This makes it clear that MC-3208 is related to the behavior of the stop command when auto-saving is turned off. It does not mention that the saves continue to occur every five minutes even before the server is stopped.
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).
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.
Still affects the latest versions of Minecraft.
Can confirm that this is still an issue in Minecraft 1.8.1.
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.
This is affecting my backup as well. For the time being I'm just going to remove write permissions from the playerdata directory while saving is turned off (i.e. while my backup script is running).
Does this still happen on 1.10.2? I can't seem to reproduce it with the steps in the description – both /stop and ^C seem to save the world and inventories.
I can't reproduce in 16w33a either.
I'd argue that it's not fixed; in fact, it's made worse.
As null said, If saving is turned off, shutting down the server now saves both the world and player inventories; basically rendering /save-off useless.
Perhaps reopen with an updated title? Or does this warrant a new JIRA?
Agreed. If player data is still being saved at all with auto-saving off (and I have confirmed that it is also saving while the server is running), this bug is not fixed. I do not know whether the world saved on server termination with auto-saving off prior to 1.10, but I believe it should not.
The wiki indicates that the `save-off` command "Disables the server writing to the world files. All changes will temporarily be queued." This does not specify that this functionality is limited to while the server is running and would lead a reasonable person to believe that the data should also not be saved on termination.
Reopened and edited.
Brandon Dusseau 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.
Josh Johnson 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...
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.
Still present throughout 1.16.