Backups

Create a new backup schedule

Changed on
post/backups/schedules

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    HTTP bearer

Request body

backup_typestring required
descriptionstring nullable
enabledboolean required
include_control_planeboolean nullable

When true (default), every run also produces a control_plane backup of Temps's own database. Operators who use Temps purely as a backup orchestrator for external DBs can set this to false to keep the run history focused on those services.

max_runtime_secsinteger nullable

Optional wall-clock timeout override for jobs created by this schedule (seconds). When set, overrides the engine-family default. null means "use engine default." The per-job max_runtime_secs in EnqueueJobParams can still override this for ad-hoc triggers.

namestring required
retention_periodinteger required
s3_source_idinteger nullable

Optional S3 source. If omitted, the current default S3 source is used.

schedule_expressionstring required

Cron expression with a leading seconds field: sec min hour day-of-month month day-of-week, for example 0 0 3 * * * for every day at 03:00 UTC. A five-field expression such as 0 3 * * * is rejected.

service_idsinteger[]

External services to target when target_all_services is false. The schedule and these memberships are created atomically, so an enabled schedule can never be observed without its requested targets.

tagsstring[] required
target_all_servicesboolean nullable

When true (default), the schedule backs up every external service on the host — including databases created in the future. When false, the schedule backs up only the services supplied in service_ids (or later attached through the schedule-services API). Omit to use the default.

Example request

{
  "schedule_expression": "0 0 3 * * *"
}

Response

Backup schedule created

backup_typestring required
created_atstring date-time required
descriptionstring nullable
enabledboolean required
idinteger required
include_control_planeboolean required

When true, every run also produces a control_plane backup (Temps's own Postgres). When false, only the external service fan-out happens.

last_runstring date-time nullable
max_runtime_secsinteger nullable

Per-schedule wall-clock timeout override for backup jobs (seconds). null means the default of four hours (14400 seconds) is used.

namestring required
next_runstring date-time nullable
retention_periodinteger required
s3_source_idinteger required
schedule_expressionstring required
tagsstring[] required
target_all_servicesboolean required

When true, the schedule auto-includes every external service on the host (and any future ones). When false, the schedule only targets services attached via backup_schedule_services.

updated_atstring date-time required

Example response

{
  "schedule_expression": "0 0 3 * * *"
}

Changes

    • breaking

      the created_at response's property type changed from integer to string, and format from int64 to date-time for status

    • breaking

      the last_run response's property type changed from integer null to string null, and format from int64 to date-time for status

    • breaking

      the next_run response's property type changed from integer null to string null, and format from int64 to date-time for status

    1 more change in this revision