# Safe Game Server Maintenance Runbook

## Preconditions

- [ ] Requester identity and role are verified.
- [ ] Exact server profile and requested change are unambiguous.
- [ ] Current game, runtime, loader, pack, and mod versions are recorded.
- [ ] Connected players are queried through the supported authenticated interface.
- [ ] Players have been warned when maintenance will interrupt a live session.

## Preserve

- [ ] Ask the game to save and confirm acknowledgement.
- [ ] Run `prechange-backup.ps1` with an external backup root and specific reason.
- [ ] Confirm the manifest exists, file count is nonzero, and hashes were written.
- [ ] Preserve the current compatibility manifest and configuration diff.

## Stop and Change

- [ ] Stop through the game's supported graceful admin or console command.
- [ ] Confirm the exact process and expected listeners have exited.
- [ ] Apply only the pinned update or exact artifact set tested in staging.
- [ ] Preserve native updater exit codes and errors.

## Verify

- [ ] Start the exact server profile.
- [ ] Run `server-health-check.ps1` for process, listener, current log, and ready marker.
- [ ] Run the game's authenticated status query.
- [ ] Compare configured mods/items with current-run loaded evidence.
- [ ] Confirm the expected game, branch, world, and save identity.
- [ ] Require a real client join after world, loader, pack, or compatibility changes.

## Close or Roll Back

- [ ] Return a sanitized receipt with previous/current versions and each check result.
- [ ] Do not declare success if any required check is unknown or failed.
- [ ] If rollback is required, preserve the failed state before restoring the previous set.
- [ ] Re-run every readiness and client-acceptance check after rollback.
