Linux Only: This mod is specifically designed for Linux/Unix environments. It utilizes
niceandionicefor process prioritization. Windows is not supported.
A high-performance, automated snapshot system using git version control for Luanti worlds. This mod leverages git to provide lightweight, incremental backups of your world state with minimal impact on server performance.
- Automated Snapshots: Periodically saves the world state (default: every 15 minutes).
- Low Impact: Uses
niceandioniceto ensure backup processes don't cause lag spikes for players. - git Hash Identification: Every snapshot is identified by its unique git hash, making rollbacks precise and tamper-proof.
- Easy Rollbacks: Revert the entire world to any previous snapshot via chat command or the in-game GUI.
- In-Game GUI: A graphical interface for browsing, committing, and reverting snapshots without typing commands.
- In-Game Log: View snapshot history with hashes, timestamps, and relative ages without leaving the game.
- Safety First: Automatic git lock cleanup, countdown broadcast, player kick, and graceful shutdown during reverts.
- git: Must be installed on the host system.
- Operating System: Linux/Unix only (required for
niceandionice). - Permissions: Requires an insecure environment to execute system commands.
- Clone the repository into your mods folder:
git clone https://github.com/Senal-D-A-Gunaratna/luanti_git_backups.git ~/.minetest/mods/luanti_git_backups-
Enable the mod in your world configuration.
-
Required: Add this mod under
Trusted modsusing the Luanti Settings GUi
- enable
Show advanced settings - go to
Developer Options→Trusted Mods - add
luanti_git_backupsunderTrusted Mods
cd ~/.minetest/mods/luanti_git_backups
git fetch --all
git reset --hard origin/mainUse the Luanti Settings GUi
- go to the
modssectionLuanti git backupsValue is in seconds. Default is 900 seconds (15 minutes)
All commands require server privileges.
| Command | Alias | Description |
|---|---|---|
/git commit |
-c |
Manually create a world snapshot. |
/git log |
-l |
Show the last 15 snapshots with hash, timestamp, and age. |
/git revert <hash> |
-r <hash> |
Revert the world to the specified snapshot hash and restart the server. |
/git gui |
-g |
Open the in-game snapshot GUI. |
Open with /git -g or /git gui. Requires server privileges.
The GUI provides:
- Scrollable snapshot list showing hash, timestamp, and age for up to 50 recent snapshots.
- Commit Snapshot button to manually trigger a backup.
- Revert to Selected button — select a row then click to revert. A confirmation dialog will appear showing the hash and timestamp before anything is changed.
- Refresh button to reload the snapshot list.
Whether triggered by command or GUI:
- All players receive a warning broadcast with a 5-second countdown.
- All connected players are kicked with a notification.
- The world is hard-reset to the selected git commit.
- The server shuts down automatically so the database reloads cleanly on next start.
- Snapshot Identity: Snapshots are identified by their git short hash (e.g.
a3f9c1d). Both the chat command and GUI accept short hashes. This is more reliable than sequential numbers, which can shift after a revert. - Storage Efficiency: git stores only deltas between snapshots, making it far more disk-efficient than
.zipor.tarbackups. - Auto Initialisation: On first run the mod automatically runs
git initin your world folder if no repository exists. - Lock Cleanup: Stale
.git/index.lockfiles are automatically removed before each commit to prevent backup failures.
- Code: Licensed under the MIT License.
- Git Logo: Original logo by Jason Long, licensed under CC BY-SA 3.0.