Pin Minecraft 26.3 and add safe Orion managed deployment support
This commit is contained in:
1 parent
dff2b5a9c4
commit
008120dbad
40 files changed
+1877
-490
No files matched your search
+10
-48
@@ -1,57 +1,19 @@
|
||||
# Backups & restore
|
||||
# Backups and restore
|
||||
|
||||
## What runs automatically
|
||||
The backup sidecar archives server data every 24 hours by default and keeps seven days locally. It flushes the world through RCON first and excludes temporary files, caches and logs. Manual panel backups wait for a newly created archive to pass complete gzip/tar validation. A request acknowledgment alone is not backup success.
|
||||
|
||||
The `backup` sidecar (itzg/mc-backup) tars the entire server data directory to
|
||||
`data/backups/world-<timestamp>.tgz`:
|
||||
Config and mod Apply require a successful safety backup; failure cancels the operation. Standalone world reset does too. Orion managed mode rejects configuration changes and world reset entirely; upgrades are reviewed in homelab-infra.
|
||||
|
||||
- flushes the world to disk first (`save-all`), safe while players are online
|
||||
- interval: `BACKUP_INTERVAL` in `.env` (default `24h`)
|
||||
- retention: `BACKUP_RETENTION_DAYS` (default `7`) — older tars are pruned
|
||||
- excludes caches and logs
|
||||
## Same-release world restore
|
||||
|
||||
Safety backups are also taken automatically before config applies (when enabled) and
|
||||
world resets.
|
||||
Use the Backups page, or `scripts/restore.sh /absolute/path/backup.tgz` as the standalone fallback. Orion's fallback takes the extra arguments `/opt/minecraft/project /opt/minecraft/data`.
|
||||
|
||||
## Manual backup
|
||||
The panel stops Minecraft and the backup writer, validates archive paths and the managed release lock, extracts a clean staging tree, and moves the existing data into a retained `restore-*/previous` directory. It preserves the bind-mount root and correct server ownership. Files that only existed in the newer world are not left active. On failure the writers remain stopped for inspection. The shell fallback also stops the panel to avoid competing requests.
|
||||
|
||||
- Panel: Backups page → **Back up now**
|
||||
- CLI: `docker exec mc-backup backup now`
|
||||
Do not overlay an archive with `tar -xzf` onto a populated world. Keep the world and staging workspace under a common parent mount, on the same filesystem. Reserve disk for the active world, staged copy and retained previous data, and remove retained copies only after confirming a successful recovery.
|
||||
|
||||
## Restoring
|
||||
## Complete recovery
|
||||
|
||||
Panel: Backups page → **Restore** → type `restore`. The panel stops the server,
|
||||
extracts the tar over the data directory, and starts the server again. Everything since
|
||||
that backup is lost.
|
||||
A world archive contains Minecraft and EasyAuth state. It does not contain CraftDeck's database, deployment config, proxy secret or panel credentials. For Orion use `homelab-infra/stacks/minecraft/cold-backup.sh`: it stops the stack and captures the complete deployment plus an export of the pinned panel image. Copy the secret-bearing backup off-host with private permissions.
|
||||
|
||||
CLI fallback (panel down):
|
||||
|
||||
```bash
|
||||
./scripts/restore.sh data/backups/world-20260710-050000.tgz
|
||||
```
|
||||
|
||||
## Off-site copies (recommended)
|
||||
|
||||
`data/backups/` is just files — sync it anywhere:
|
||||
|
||||
```bash
|
||||
# example: nightly rsync to another machine (add to the host's crontab)
|
||||
0 6 * * * rsync -a --delete /path/to/minecraft/data/backups/ backup-host:/srv/mc-backups/
|
||||
```
|
||||
|
||||
You can also download any backup from the panel (⬇ button) before risky experiments.
|
||||
|
||||
## Disaster recovery (new machine)
|
||||
|
||||
```bash
|
||||
git clone <repo> minecraft && cd minecraft
|
||||
./scripts/setup.sh # fresh secrets — friends keep their passwords,
|
||||
# those live in the world data, not in .env
|
||||
mkdir -p data/backups && cp <your-backup>.tgz data/backups/
|
||||
docker compose up -d # let it initialize once
|
||||
./scripts/restore.sh data/backups/<your-backup>.tgz
|
||||
```
|
||||
|
||||
The backup contains the world, mods, configs, and the EasyAuth database, so player
|
||||
registrations survive. Panel state (approval history, metrics) lives in
|
||||
`data/dashboard/` — include it in your off-site sync if you want it back too.
|
||||
Restore a different release only with its matching complete backup, release lock and image. Keep the failed state recoverable, restore into a clean directory and recreate containers when replacing mount roots. Do not downgrade Minecraft against a newer world. Test the complete restore in isolation before relying on it. See [orion.md](orion.md) and the infrastructure runbook for the release workflow.
|
||||
Reference in new issue
Block a user