Showing posts tagged minecraft

mcwrapper 1.4.2

Last night I released version 1.4.2 of mcwrapper. This fixes a major bug that cropped up recently involving the mechanism that reads commands from the FIFO. A nice Redditor fixed the bug, refactored my function and sent me a pull request last night and after a little QA, I merged his code and tagged the 1.4.2 release.

When I release 1.5 (towards the end of september), it will have an updater rolled up with it, so updating mcwrapper will be much more painless in the future.

As usual, you can either git pull if you cloned my repo or download the new version and manually update from one of the following locations:

and mcwrapper’s project page is located at:

mcwrapper 1.4 released

I just released version 1.4 of my mcwrapper application. This update improves usability, and adds a couple new features. Overall, it’s a minor release.

Changes include:

  • New log action. Will show server.log output in real-time.
  • Added new BACKUP_ON_EXIT config option. When enabled, this will create a backup whenever you stop the Minecraft server.
  • Added new scripts which can be double-clicked to start/stop the server and create backups. This makes it easier on commandline-impared users.

1.4 also includes an enhancement from 1.3.1 (a silent release) that fixes a bug where mcwrapper will slowly eat all the memory on your system as it reads commands from the FIFO. This was caused by using a recursive function when a simple loop would have been sufficient.

I’m aiming to get 1.5 released by the end of September which should include both launchd and ubuntu init scripts, backup restoration and other enhancements.

mcwrapper’s GitHub project page is located at the following address:

https://github.com/spikegrobstein/mcwrapper

You can download 1.4 using the following links:

mcwrapper v1.1.0 released

I updated mcwrapper to fix some bugs since my last post. mcwrapper now creates the pipe properly and allows for more configuration options.

I also added a new script called mcbackup which will allow you to back up your Minecraft world data while the server is running without any service interruption. The backup script creates a directory called ‘backup’ in the Minecraft server directory and copies your world data and configuration files (whitelists, banned-ips, server.properties, etc) into a datestamped directory inside the backup directory. By default, it keeps the previous 5 backups, but that can be changed by editing the mcbackup script.

Now, you can easily back up your Minecraft world data from a cron without needing to write your own script.

Version 1.1.0 of mcwrapper is available for download:

https://github.com/spikegrobstein/mcwrapper/tarball/1.1.0

See the README for details.

Automated Minecraft Server backups

Update (2011-08-30)

mcwrapper 1.4 has been released. it includes a slew of new features including backups. See other posts for more info or look at the github page:

https://github.com/spikegrobstein/mcwrapper

I’ve been running a Minecraft server off my MacMini for the past month or so and, in doing as much work as I have and being the vigilant SysAdmin that I am, it was really starting to irk me that there was no way to do proper automated backups of the Minecraft server world data.

The solution for this was that I needed to wrap minecraft_server.jar in another script that could somehow take commands as input and pass them off to the minecraft server so I wouldn’t need to run the daemon in the foreground. I wound up doing just that.

mcwrapper is the answer: https://github.com/spikegrobstein/mcwrapper

It’s got the ability to start and stop the server, which are the beginnings to getting launchd (OSX) and sysV init scripts (Linux) to enable you to treat minecraft_server.jar as a standard daemon.

Because I’m using a FIFO to communicate with the Minecraft process, you can also pipe data to the FIFO to execute arbitrary commands and script your cheats or stop Minecraft from writing to the world files while a backup process is run and start it back up when completed, thereby doing a full, automated backup without stopping the server.

See the README file for a quickstart and other details.

The software is only an alpha release right now, since I only spent about 2 hours on it already, but I believe it should be usable. As of this writing, it’s possible to start multiple instances of the server, but mcwrapper does check to make sure the server is running before issuing any commands.