Minecraft Java Edition – How to Batch Backup Minecraft Worlds from the OS?

minecraft-java-editionminecraft-java-edition-serverminecraft-spigot

I am not sure this is the right SE for this question, another place could be the Game Development SE – feel free to move it if appropriate.

I run a spigot (minecraft) server for my children and would like to back up their worlds (they use Multiverse). Is there a right way to do that from the OS level without stopping the server?

Note: I am specifically asking about the restrictions on spigot side – how to perform the backup on the OS is something simple I will take care of.

Best Answer

Generally, I either use plugins like the following:

Simple Backup - Bukkit

These plugins will make sure the world is flushed to disk and then copied over to a backup folder. You cannot just copy over the world at random times because you might be copying partial worlds over.


If you don't want to use plugins, you could also pass the following commands to stdin:

/save-off
/save-all

then you should wait for a while, something like 30 seconds should be enough. Then you could copy the world and other files that need backing up.

Then, after that it is a good idea to pass the following command into stdin:

/save-on

This method basically turns off autosave, then forces a flush. Then you can copy the file, and when you are done, you re-enable autosave.