Backup Minecraft maps on Linux

by Stephen Fluin 2010.10.14

Minecraft rocks!

Minecraft is one of the best games of 2010. Unfortunately in its current iteration, it only supports a max of 5 saves, and these saves can get pretty big and important, as people are putting hundreds or thousands of hours into their Minecraft creations. In order to support this workflow, it is important to have a backup. It can also be helpful or fun to have incremental backups of the Minecraft map so that you can restore your map to earlier positions, or share progress with friends. My recommended solution is rdiff-backup.

rdiff-backup is a tool that is built on the capabilities or rsync, but rdiff-backup adds incremental storage, and cool abilities such as being able to delete incremental backups older than x days.

Backing up singleplayer Minecraft maps

If you want to backup all of your minecraft settings, you should backup the entire ~/.minecraft folder. If you only want to backup a single save, you will need to know the number of the save and the path will look like ~/.minecraft/saves/World2/.

rdiff-backup ~/.minecraft/saves/World2 /path-to/my-minecraft-backup/

Backing up a Multiplayer Minecraft server

rdiff-backup is also great for backing up multiplayer servers, especially if the server is hosted remotely. This is because rdiff-backup is based on rsync, which gives it the capabilities to easily connect to other computers over SSH. The downside to backing up remote computers is that both machines must have rdiff-backup installed. If you are using Ubuntu, this is as easy as sudo apt-get install rdiff-backup. I store my remote files on a server called "yt", and in the mcs folder. My world name is left as the default "world", but there is a folder based on your world name that you will need to lookup. Once I have the right paths in mind, I use the following command to make the backup:

rdiff-backup peell@yt::mcs/world /path-to/minecraft-smp-backup/