Host-local administration#

Destructive and schema-changing operations run only on the host that runs the server, through the geonemo-services command. They are never remote API routes or MCP tools, and the typed client does not expose them. Ordinary clients use the versioned API.

The commands of an optional part exist only when the part is in the parts list. The generated Server commands lists every command and parameter.

Run commands#

Inside a Compose stack, use the database-admin service, which carries the migrator credentials and is not started with the stack:

docker compose --env-file ENV_FILE $files run --rm --no-deps \
  database-admin geonemo-services database migrate

On a host without a stack, copy deploy/configs/admin.env.example to a private file, replace every placeholder, set mode 0600, and load it only in the shell that runs the command. Never mount it into an API, worker, monitor or retention container.

Commands#

Task

Command

Apply schemas

geonemo-services database migrate

Verify the installed baseline

geonemo-services database migrate --online

Back up all databases

geonemo-services database backup DESTINATION

Verify a backup

geonemo-services database verify-backup SOURCE

Restore into empty databases

geonemo-services database restore SOURCE --confirmation PHRASE

Reconcile dependent layers

geonemo-services database reconcile-layer-dependencies --user-id ID

Export canonical GKB Markdown

geonemo-services gkb export OUTPUT

Restore a GKB snapshot

geonemo-services gkb restore TARGET

Reconcile canonical files with projections

geonemo-services gkb reconcile

Rebuild projections

geonemo-services gkb reconcile --rebuild-empty-catalog

Run compaction and backup once

geonemo-services gkb maintenance --once --backup-closed

Issue a service credential

geonemo-services access issue-service-token --name NAME

The confirmation phrase of a destructive command is printed in its --help output.

Rebuild the GKB projection#

The projections in PostgreSQL are rebuildable. The canonical Markdown root is the source of truth, with one writer set per root.

  1. Stop the GKB worker and maintenance processes.

  2. Back up the canonical root.

  3. Point the server at an empty projection database and run geonemo-services database migrate.

  4. Run geonemo-services gkb reconcile --rebuild-empty-catalog.

  5. Start the processes again.

The command refuses a projection database that is not empty.

Rules#

  • Verify a backup offline and restore it into isolated, empty targets before relying on it.

  • Never attach one canonical root to two writer sets.

  • Reset, restore, reconciliation and deletion commands are run by an operator who reviewed the exact change; nothing in the API triggers them.

  • Production Milvus administration is also host-local.