Where is the world saved on a Minecraft server, and how do I back it up?

  • I've found some related answers: I think I get maps and worlds, and I now know where single-player saves are located. I'm not sure I completely understand this answer about copying a multiplayer map to single-player, but in any case, I'm only concerned about multiplayer survival mode:

    Suppose I'm running a Minecraft server on Windows for myself and friends. Which files should I save to "back up" the state of the world at a particular point?

    For example, I might want to do this just when I need to shut off the server, to be sure not to lose anything; to save one world and go back to it later, while starting a new one for now; or to restore the world from an earlier state, when we hadn't flooded the house with lava yet.

    If you run your minecraft server from within a Dropbox, Google Drive, or Microsoft Skydrive folder, everything will be backed up automatically.

  • a cat

    a cat Correct answer

    9 years ago

    The world data, which also includes player inventories, is saved to a folder in the current working directory of the server.

    The name of said folder depends on the level-name setting in server.properties, and defaults to world. Thus, you can start a new world and toggle between the saves by simply changing this setting.

    Vanilla server commands related to saving/backups:

    • /save-all - forces the server to save.
    • /save-off - disables saving. You should definitely execute this before making a backup of a running server to ensure that the server doesn't save while you're copying, which could result in a corrupt backup.
    • /save-on - re-enables saving.

    Thank you! I didn't even think to disable saving while making a backup.

    i saved the server to my desktop so were will the directory be??

    Do you know if there is there a way to run the `save-off` and `save-on` commands from a batch job?

    @Mike If you're just looking for an automated way to make backups, you can look into plugins to do this such as Bukkit Backup or other Bukkit backup plugins. I would also recommend looking into mcrcon, which lets you run commands remotely.

License under CC-BY-SA with attribution

Content dated before 6/26/2020 9:53 AM