A thinning Minecraft backup script
Find a file
2026-01-30 03:00:05 +11:00
.gitattributes Initial commit 2025-11-12 02:35:01 +11:00
.gitignore fixed default config 2026-01-30 02:56:39 +11:00
.python-version init 2025-11-12 02:56:37 +11:00
config.yaml.sample fixed default config 2026-01-30 02:56:39 +11:00
LICENSE Create LICENSE 2025-11-12 02:59:13 +11:00
minecraft-backup.py forgot paren 2025-11-12 03:21:03 +11:00
pyproject.toml init 2025-11-12 02:56:37 +11:00
README.md Update README.md 2025-11-12 15:12:39 +11:00
uv.lock init 2025-11-12 02:56:37 +11:00

Minecraft Backup

A Minecraft backup script using RCON and thinning backups based on calendar date.


To get started, copy config.yaml.sample into config.yaml if you want to use a template.

cp config.yaml.sample config.yaml

To run, use uv.

uv run minecraft-backup.py

Config File Parameters

Parameter Type Explanation
minecraft_location String Location of your Minecraft server directory
backup_location String Location where backups will be copied to
backup_folders String Array Folders (and probably files) in minecraft_location to back up
silent Boolean If backup messages should be broadcast to the server
rcon_ip String IP of Minecraft's RCON instance, should be localhost by default
rcon_port Integer Port of Minecraft's RCON instance, should be 25575 by default
rcon_password String Password of Minecraft's RCON instance, set in server.properties
retention Dict Used to set how many backups for each thinning period to retain. To not backup a period set to 0. All keys must be present.