3

I'd like to move my Minecraft server to a Dropbox folder, but I don't know how to do it. Is it possible? Is it safe?

I'm using Ubuntu 11.10. Minecraft server created the world and server options in the user home folder, /home/user. Is there a way to move all Minecraft server data to /home/user/Dropbox/minecraft?

2
  • I'm afraid your only option is to manually move all the required files. On the upside, it is possible, and as long as you get the important stuff (I'm guessing your world is important to you?), it should automatically regenerate the rest. Oct 26, 2011 at 15:49
  • There isn't problem about start a new world, I would like to know if it is possible to create the data in the dropbox folder because I could have two different machines in different places which run the same world, obviously only one server up per time)
    – vitto
    Oct 28, 2011 at 23:14

3 Answers 3

3

The Minecraft server simply uses the current working directory to store its files. Moving the data is as easy as actually moving it and starting the server with a different working directory.

How you do that is mostly up to you. Windows shortcuts allow you to set the working directory, as do batch files or Linux shell scripts. Since you mentioned you're using Ubuntu, this simple shell script should do the trick:

#!/bin/bash
cd /home/user/Dropbox/minecraft
java -Xmx1024M -Xms1024M -jar /home/user/minecraft_server.jar &

However, as BlaXpirit pointed out, Minecraft's server files are frequently written, and Dropbox does store all versions of synced files. Depending on the popularity of your server, this might put unnecessary strain on your network and Dropbox's service. If you just want a backup, scheduling a job to periodically move the server files to your Dropbox folder might be a better idea.

1
  • It might be a good idea to note that single-player always stores it in ~/.minecraft/, unlike the server. I think. I'm not even sure.
    – Xkeeper
    Oct 28, 2011 at 22:53
1

Please note that this is really not recommended as server files are probably constantly updated while the server is running, and you may get a real mess in Dropbox.

Linux and ext* file system allow us to create a "symbolic link". The files can physically be in the server's folder and linked to in Dropbox folder (or vice-versa).

I'm not sure how to create symbolic links in GNOME or Unity environment, but it seems to be so:
Right click on the original folder, select Make link, move and rename the new link any way you want.

2
  • To chime in you really do not want to put server files like that into a dropbox folder. However it is possible, I use Dropbox for my client simply by remapping my .minecraft folder to point to Dropbox\.minecraft
    – James
    Oct 26, 2011 at 17:18
  • 1
    @James: Have I not written that?
    – BlaXpirit
    Oct 26, 2011 at 17:24
1

It depends on what you're trying to accomplish. Are you going to just be reading the server data, or are you planning on editing the world on another system and having it update?

If the latter, you're out of luck (unless you want to do some in-depth management, and even then Minecraft might keep copies of chunks in RAM and overwrite your updated version).

If you just want to be able to copy the files elsewhere, the easiest way may be to write a simple cronjob to automatically copy your Minecraft data every ten minutes or so:

*/10 * * * * cp -r /home/user/.minecraft /your/dropbox/folder/

You may end up wanting to tweak the 10-minute timer though, maybe to 15 or higher depending on how tolerant Dropbox is of your Minecraft shenanigans.

The other option is, as stated, to make a symbolic link:

ln -s /your/dropbox/folder ~/.minecraft

...but as was stated above, this is a bad idea for a whole bunch of reasons.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .