A docker container that creates regular backups of a Minecraft world, manages those backups and enab
206
This docker container can be run together with itzg/minecraft-server and provides a comprehensive set of tools to regularily backup the minecraft world, apply retention policies and restore to previous states.
The tool communicates with the minecraft server through RCON messages and can optionally log the current activities to specific users on the server.
The backup process itself has been designed to ensure data integrity. Unfortunately Mojang does not guarantee auto save off (See MC-217729), however the tool will try and detect inconsistencies.
In order to restore back to a previous backup, this docker container needs to be able to access the local docker daemon. For this, please expose the docker socket through a volume bind:
/var/run/docker.sock:/var/run/docker.sockThe following environmental variables can be used for configuration:
MC_DOCKERCRON_SCHEDULERCON_PASSWORDRCON_HOSTRCON_PORTRCON_PREFIXKEEP_HOURLYKEEP_DAILYKEEP_WEEKLYKEEP_MONTHLYKEEP_YEARLYDEBUGLOG_RCONTZThe following paths are recommended for persisting state and/or accessing configurations
/world/
Source location of the current Minecraft world./config/
Configuration directory/history/
Directory holding the backup historyUsage with itzg/minecraft-server inside a predefined steilerGroup network.
version: '3'
services:
minecraft:
image: itzg/minecraft-server:latest
container-name: minecraft
ports:
"25565:25565"
volumes:
- /opt/steilerGroup-Docker/minecraft/volumes/data:/data
environment:
<...>
RCON_PASSWORD: "someRCONPwd"
<...>
restart: unless-stopped
minecraft-backup:
image: steilerdev/minecraft-backup-docker:latest
container_name: minecraft-backup
volumes:
- /opt/steilerGroup-Docker/minecraft/volumes/data/world:/world
- /opt/steilerGroup-Docker/minecraft/volumes/history:/history
- /opt/steilerGroup-Docker/minecraft/volumes/mc-backup-config:/config
- /var/run/docker.sock:/var/run/docker.sock
environment:
CRON_SCHEDULE: "0 * * * *"
RCON_PASSWORD: "someRCONPwd"
RCON_HOST: "minecraft.steilerGroup"
LOG_RCON: "derduesterriese"
KEEP_HOURLY: "6"
KEEP_DAILY: "5"
KEEP_WEEKLY: "3"
MC_DOCKER: "minecraft"
TZ: "Europe/Berlin"
depends_on:
- "minecraft"
networks:
default:
name: steilerGroup
external: true
Content type
Image
Digest
sha256:6cecc4448…
Size
78.4 MB
Last updated
almost 4 years ago
docker pull steilerdev/minecraft-backup