After the archive is produced, tag the current HEAD as backup-<stamp>,
create a Gitea release, and attach the tarball. Token is read from
$GITEA_TOKEN or ~/.gitea_token; upload is skipped if neither is set.
When the minecraft container is not running, archive data/world
directly from the host instead of failing — the files are already
consistent on disk with no process writing to them.
Stream tar from inside the container to the host, so all server
interaction (rcon + archive) happens through docker exec. Requires
the container to be running; fails fast otherwise.
Flushes world via rcon (save-off + save-all flush) before tarring
when the server is running; skips the flush and archives as-is when
the container is down. Outputs timestamped archives to backups/,
which is gitignored.
Tracks docker-compose config, server scripts, and server properties.
Runtime data (world, libraries, versions, logs, jar), credentials, and
backup snapshots are gitignored.