---
title: "Run a backup for an external service manually."
method: POST
path: "/backups/external-services/{id}/run"
tags: ["Backups"]
---

# Run a backup for an external service manually.

`POST /backups/external-services/{id}/run`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/backups/external-services/{id}/run`
- Auth: HTTP bearer

Enqueues the backup for asynchronous execution via the `BackupRunner`
(ADR-014). Returns `202 Accepted` immediately: pending parent and child
rows are inserted, and a `backup_jobs` row is enqueued for the resolved
engine. Poll `GET /backups/{id}` to observe `pending → running → completed`.

## Path parameters

- `id` integer, required

## Request body

- RunExternalServiceBackupRequest
  - `backup_type` string, nullable: Type of backup to perform (e.g., "full", "incremental")
  - `confirm_restart` boolean, nullable: Acknowledge that this backup restarts the database. Required (`true`) when `GET /backups/external-services/{id}/run-preflight` reports `restarts_database`; otherwise the request is refused with a 409 and nothing is started.
  - `s3_source_id` integer, nullable: ID of the S3 source to store the backup. If omitted, the current default S3 source is used.

## Response `202`

Backup enqueued for async execution

- ExternalServiceBackupResponse: Response type for external service backup
  - `backup_id` integer, required
  - `backup_type` string, required
  - `checksum` string, nullable
  - `compression_type` string, required
  - `created_by` integer, required
  - `error_message` string, nullable
  - `expires_at` string, nullable
  - `finished_at` string, nullable
  - `id` integer, required
  - `metadata` unknown, required
  - `restarts_database` boolean, nullable: Set on the response to a manual run: this backup restarts the database to turn WAL archiving on before backing it up.
  - `s3_location` string, required
  - `service_id` integer, required
  - `service_name_snapshot` string, nullable: Immutable provenance retained when the source service is deleted.
  - `service_type_snapshot` string, nullable
  - `size_bytes` integer, nullable
  - `started_at` string, required
  - `state` string, required

## Other responses

- `400`: Invalid request
- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: External service or S3 source not found
- `409`: The backup would restart the database and `confirm_restart` was not true (error_code RESTART_CONFIRMATION_REQUIRED); nothing was started
- `500`: Internal server error

## Changes

- **2026-11-09** `12896146b193`: 6 breaking
  - removed the required property `extensions` from the response with the `400` status
  - removed the required property `extensions` from the response with the `401` status
  - removed the required property `extensions` from the response with the `403` status
  - removed the required property `extensions` from the response with the `404` status
  - …2 more
- **2026-10-12** `7cc011be3463`: 3 info
  - added the new optional request property `confirm_restart`
  - added the non-success response with the status `409`
  - added the optional property `restarts_database` to the response with the `202` status
- **2026-10-05** `4b228ebed583`: 5 info
  - added the optional property `status` to the response with the `400` status
  - added the optional property `status` to the response with the `401` status
  - added the optional property `status` to the response with the `403` status
  - added the optional property `status` to the response with the `404` status
  - …1 more
- **2026-10-05** `63a80791dc58`: 5 warning
  - removed the optional property `status` from the response with the `400` status
  - removed the optional property `status` from the response with the `401` status
  - removed the optional property `status` from the response with the `403` status
  - removed the optional property `status` from the response with the `404` status
  - …1 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/backups/external-services/:id/run/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
