How We Handle Backups for Our GTNH Servers

For years, we’ve wrestled with a common problem in the gaming community: managing massive world backups. On our GTNH 2021 server, a full world backup could balloon to over 200 GB. Backing up a file this large was becoming unmanageable and frankly, not worth the effort.


The Evolution of Our Backup System

We decided we needed a better solution, so we transitioned to a system using Restic. I created a cron job to perform incremental backups. The first backup would still be large, but subsequent backups were much smaller, often under 1 GB. This was a significant improvement, though it still had its drawbacks. Restoring something as small as a single player file was still a complex task that required a custom script or moving a huge amount of data. It got the job done, but it was far from ideal.

A real game-changer came with the Server Utilities mod in GTNH 2.7.0, which introduced a chunk-claim-based backup system. This smart system backs up only the claimed chunks within a region, and it only backs up those specific chunks, not the entire region file. This drastically reduced the backup size. What used to be a 200 GB backup on each server is now about 0.5 GB. That’s a savings of 199.5 GB!


Our Multi-Layered Backup Strategy

With our new, smaller backup files, I created a PowerShell script that connects to our three GTNH servers. This script automatically downloads the latest backup file from each server to a local NVMe drive I use for temporary storage. The script is set to keep the five most recent backups, which means we always have five days’ worth of local backups.

This is a great first step, but what if something happens to my house? Proper offsite backup is crucial. I use a Google Drive account that has plenty of storage left. The same script that handles the local backup now automatically uploads those backup files to my Google Drive, storing five backups from each server. This means we now have backups in three different locations:

  1. On the server itself
  2. On my local PC
  3. On Google Drive

In addition to this daily routine, we also perform a massive “deep storage” backup every time we update the servers, not just for major releases. For example, when we upgrade from version 2.7.4 to 2.8.0, we’ll make a full 200 GB backup and store it on an external hard drive that is then shut down and kept offline. This is our last-resort backup in case of a catastrophic failure.

I hope this gives you a better understanding of how we handle our backups. We take the safety of our world files very seriously, and we’re always looking for ways to improve our systems.

Leave a Reply

Your email address will not be published. Required fields are marked *