- docker-compose: itzg/minecraft-server (Fabric, offline mode, whitelist enforced, Modrinth-managed mods), itzg/mc-backup sidecar, custom dashboard - Gated auth for offline mode: approve username -> whitelisted with a short registration window -> EasyAuth /register + /login; auto-revoke on expiry - CraftDeck panel (Next.js 16, zero native deps): live console (SSE), players & stats, lag diagnostics (server TPS vs player ping via spark), performance graphs, Modrinth mod search/manager, backups & restore, sandboxed file browser/editor, .env config editor with compose apply, cron schedules, Discord alerts, scrypt-hashed panel login - scripts/setup.sh generates secrets; docs/ covers auth, mods, updating, backups, networking (Tailscale), troubleshooting Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
26 lines
805 B
Bash
Executable File
26 lines
805 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Manual backup restore (fallback for when the dashboard is unavailable).
|
|
# The dashboard's Backups page does this same procedure with one click.
|
|
#
|
|
# Usage: ./scripts/restore.sh data/backups/world-20260710-120000.tgz
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
|
|
archive="${1:-}"
|
|
[[ -n "$archive" && -f "$archive" ]] || {
|
|
echo "Usage: $0 <backup .tgz file>"
|
|
echo "Available backups:"
|
|
ls -1h data/backups/*.tgz 2>/dev/null || echo " (none)"
|
|
exit 1
|
|
}
|
|
|
|
echo "This will STOP the server and overwrite the current world with:"
|
|
echo " $archive"
|
|
read -r -p "Type 'restore' to continue: " confirm
|
|
[[ "$confirm" == "restore" ]] || { echo "Aborted."; exit 1; }
|
|
|
|
docker compose stop mc
|
|
tar -xzf "$archive" -C data/mc
|
|
docker compose start mc
|
|
echo "✔ Restore complete — server starting."
|