I’ve recently become addicted to Minecraft. I realize that I’m late to this game, having only recently discovered it despite its popularity over the past couple of years. As readers know, I typically switch between a few different machines throughout my day, and indeed between a few different operating systems. Luckily, Minecraft is portable and can be played on any platform – but how to go about transferring saved games?
By default, Minecraft puts your user data and game saves in a hidden folder within your home folder. In particular, save game data is stored at ~/.minecraft/saves/. My solution to the cloud save problem was to create a minecraft folder in my DropBox, and then symlink the default save folder to this location.
Start by creating a folder in your DropBox (or other cloud share platform) folder:
jonf@UBUNTU:~$ mkdir ~/Dropbox/minecraft jonf@UBUNTU:~$ mkdir ~/Dropbox/minecraft/saves
Next, back up your existing save games folder. We’ll restore these once the symlink has been created.
jonf@UBUNTU:~$ mv ~/.minecraft/saves/ ~/.minecraft/saves.old
Now create the symlink between the new DropBox folder and the save game location:
jonf@UBUNTU:~$ ln -s ~/Dropbox/minecraft/saves/ ~/.minecraft/saves jonf@UBUNTU:~$ ls -la ~/.minecraft total 24 drwxrwxr-x 3 jonf jonf 4096 Feb 21 08:58 . drwx------ 43 jonf jonf 12288 Feb 21 08:55 .. lrwxrwxrwx 1 jonf jonf 38 Feb 21 08:58 saves -> /home/jonf/Dropbox/minecraft/saves/ drwxrwxr-x 2 jonf jonf 4096 Feb 21 08:55 saves.old
As you can see, the saves folder under the .minecraft folder now points to the saves folder that we created inside of our DropBox folder. This means that if we put anything inside of that folder, it will be automatically written to the DropBox folder, which will be synced to all of my other computers.
Finally, let’s restore the existing saved games folder into the new shared folder:
jonf@UBUNTU:~$ mv ~/.minecraft/saves.old/ ~/.minecraft/saves
If I take the same steps on my other machines, then I can play Minecraft from any of my machines with my saved games always available, no matter where I am. Keep in mind that the ln syntax for Mac OSX is slightly different than the example above. The steps remain the same, but you’ll want to check the docs if you’re trying to adopt these steps for a different platform.