Saving server world on a webserver

Discussion in 'Spigot Discussion' started by TehGreekGamerJIM, Dec 14, 2016.

  1. Hey all,

    I am working on a server network and I would like to know if it is possible for the lobby and all the worlds in the network to be fetched from a webserver or sql database.
    Also how could I possibly initiate the plugin which will try to connect to the webserver before the world loading? Maybe we could add a delay so we give the appropriate time for the file to be downloaded? (Note that the file will NOT be saving playerdata).

    Thanks in advance
  2. I actually don't know. It might be possible, but honestly it's better if the world was stored on the same disk but could be fetched similarly.
    • Informative Informative x 1
  3. If you want to fetch your world of a database you probably would be needing to use a local copy. It depends on how you are wanting to use it (multiple servers using one world?). If you would, you might even need to change the sourcecode of Minecraft.
    • Agree Agree x 1
  4. Yep, multiple lobby servers using the same lobby map.

    This is what I am thinking

    When the server will boot, it will fetch the world from the webserver and load it, that way if you have like 20 lobbies and you have changed the lobby/map to something new, you will be able to just upload it there and restart all lobbies on low peak times.
    • Agree Agree x 1
  5. Best bet would actually be local world files, and just push replacement copies out. Script it, or if you control the underlying OS too, use a tool like Puppet or Salt to keep them correct.

    The webserver idea sounds kind of cool, but has potential for serious breakages. Plus, you'd still need to either restart the servers by hand, or use some other script... Which means you may aswell script the world copying and have the same script restart the servers.
    • Winner Winner x 2
  6. Yes, that is a good idea too, maybe add a piece on the restart script which will be moving the world file from a certain directory and loading it there. Not a bad idea at all!