Athena

Clone Jobs

Runbook for Athena durable Postgres clone jobs.

What This Covers

Athena clone jobs turn one external Postgres URL into one Athena-managed Docker Postgres target through a durable control-plane workflow.

Routes:

  • POST /admin/provision/clones
  • GET /admin/provision/clones
  • GET /admin/provision/clones/{job_id}
  • POST /admin/provision/clones/{job_id}/cancel
  • POST /admin/provision/clones/{job_id}/retry

Ownership Model

  • The API server persists and exposes clone jobs.
  • athena-daemon claims and executes clone jobs.
  • Job/event history lives in the logging database.

Target Modes

  • Create one new Athena-managed Docker Postgres instance and database.
  • Reuse one existing Athena-managed server client and create one fresh database in it.

Operational Checks

  1. Confirm the logging client is connected.
  2. Confirm pg_dump and pg_restore are present.
  3. Confirm Docker is available on the daemon host for managed targets.
  4. Inspect clone job event history when a job stalls or fails.
  5. Verify daemon id and lease ownership on active jobs.

Failure Handling

  • Use cancel to request cooperative shutdown for an active job.
  • Use retry only for terminal or retryable failures that should requeue.
  • Treat authentication failures, malformed URIs, and deterministic bootstrap errors as terminal.