Skip to content

Operate

Admin guide · Operate runbook

🟢 Supported · ⚠️ snapshot before change · logs stay on the host

When to use Before you start Steps Verify Roll back
Daily health, backup, log triage Snapshot + backup ready List, check, log, back up Health 200, ports open, no errors Restore dump or snapshot copy

When to use

You are on call: checking health, reading logs, taking a backup, or deciding which incident runbook to open next. This is the loop that runs forever in the diagram on the guide home.

Before you start

  • Run container commands on the host, not inside a container. Use the incus CLI only; the legacy container runtime is not supported.
  • Keep a snapshot and a database dump from before the change you are about to make. Backups go in /tmp, never in the repository root.
  • botserver.log carries API requests, errors, script execution, navigation events and drive_monitor sync; botui.log carries UI and WebSocket events.
  • Never restart botserver for a config.csv change — the DriveMonitor reloads it on ETag change (~10s).

Steps

## State and health
sudo incus list --format csv
curl -s -o /dev/null -w '%{http_code}' http://localhost:8080/health
sudo incus exec <container> -- pgrep -a botserver
## Logs
tail -f botserver.log botui.log
grep -E "ERROR|WARN|drive_monitor" botserver.log | tail -20
sudo incus exec <container> -- journalctl -u <service> -f
## Snapshot before any change, then back up the database
sudo incus snapshot create <container> pre-change-$(date +%Y%m%d%H%M%S)
pg_dump -U postgres -F c -f /tmp/backup.dump <dbname>
df -h /

Component logs and the base paths are /opt/gbo/bin, /opt/gbo/data, /opt/gbo/conf and /opt/gbo/logs (repository AGENTS.md). Port map for the host: 8080 API, 3000 suite, 4000 cloud, 5000 login, 5432 database, 6379 cache, 8200 secrets, 9000 drive.

Verify

Check Command Pass condition
Health curl -s -o /dev/null -w '%{http_code}' http://localhost:8080/health 200
Process sudo incus exec <container> -- pgrep -a <process> one live process
Ports sudo incus exec <container> -- ss -tlnp expected port is listening
Errors grep -E "ERROR|WARN" botserver.log \| tail -20 none new
Disk df -h / headroom remains
Backup ls -l /tmp/backup.dump non-empty dump

When the health check fails, stop everything and fix the root cause; never restart a server to hide an error. Pick the matching runbook below.

Roll back

🔴 Restore the dump or copy the snapshot into a new instance:

pg_restore -U postgres -d <dbname> /tmp/backup.dump
sudo incus snapshot list <container>
sudo incus copy <container>/<snapshot> <container>-restored
sudo incus start <container>-restored

The host mounts under botserver-stack/ survive an instance replacement. Re-run the verification table after recovery.

See also restore backup runbook, disk and queue runbook, LLM outage runbook, rotate secrets runbook, disable tenant runbook, production readiness and incident response.