Currently my Minecraft server, residing on a CentOS server, uses Git as a means of version control and 'catastrophe-management'. This works very well except for two issues:
It's big. Because the server has a central repository, master branch (on which the server actually runs) and a test-server branch, each containing every committed change ever made fills the SSD up no-end (using approximately 70GB from the last 1.5 months of usage)
It's slow. After having so much data stored in the objects directory, commits, pushes and pulls are slow as it tries to compress/uncompress and parse all this data.
I'm looking for either a solution to make Git more effective for this application, or a replacement. Here are some of the reasons I chose to use Git:
When we used to use a precise tarballing bash script to backup the server, we usually removed backups that were more than 2 weeks old. With incremental backups, this period should be one month or greater.
If you're unfamiliar with Minecraft's structure, it goes a bit like this:
.
|-- plugins
|-- SomePlugin
|-- config.yml
|-- SomePlugin.jar
|-- world
|-- region
|-- (binary files of chunks, a 2000x2000 world is often 1GB in size)
|-- mcmmo_data (third party plugin)
|-- x coordinate
|-- y coordinate
|-- small flatfile
|-- level.dat
|-- stuff.txt
|-- properties.yml
|-- server.jar
Any ideas anyone?
Head to the Game Panel and stop the server. To the left of the game panel, click on the “Backup” tab. Locate which world/date you want to restore and press “Restore” to the right of it.
git bundle is can be used for backup purposes. It will create a single file containing all the refs you need to export from your local repository. For one branch, it's simple. This command will create a myrepo.
One option you might consider, in order to store the binary/large files, is git-annex, which is designed for managing large objects inside of git. It would let you check in those huge files without cluttering the central git database itself. But, it would require some rethinking about how you mess with those files and let them change over time. It does have a nice push/pull/backup component that would likely work well, but you'll run into other "new ways of thinking" that you'll need to deal with. Try it on a test system first, of course.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With