28

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.

1
  • 1
    If you run your minecraft server from within a Dropbox, Google Drive, or Microsoft Skydrive folder, everything will be backed up automatically. Commented Sep 8, 2012 at 18:14

2 Answers 2

20

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.
4
  • Thank you! I didn't even think to disable saving while making a backup.
    – aedia λ
    Commented Jun 22, 2011 at 14:27
  • i saved the server to my desktop so were will the directory be??
    – user14851
    Commented Nov 20, 2011 at 8:22
  • Do you know if there is there a way to run the save-off and save-on commands from a batch job?
    – mpontillo
    Commented Apr 26, 2012 at 14:53
  • @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.
    – Schism
    Commented Sep 8, 2012 at 19:23
4

Within the directory you're running the server from, there should be a world folder. In that directory are all of the files that your server needs to run. The most important thing to backup would be the region folder within the world folder, which actually contains all the "block information". Another folder within the world directory is the players folder, which stores informations about the players that connect (inventories, etc). (Note that the directory is only named world if you haven't changed the level-name property in server.properties.)

This information is true of a Vanilla and a Bukkit multiplayer server.

TL;DR: backup the entire world directory.

Not the answer you're looking for? Browse other questions tagged or ask your own question.