---
title: "Sync Database Backups Endpoint"
method: PUT
path: "/internal/databases/{database_id}/backups/sync"
tags: ["internal"]
---

# Sync Database Backups Endpoint

`PUT /internal/databases/{database_id}/backups/sync`

## Request

- Base URL: `https://api.mengi.cloud` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mengi.cloud/internal/databases/{database_id}/backups/sync`
- Auth: none declared. Required headers: `x-service-token`

Mirror the cluster's Backup objects into database_backups (worker only).

Called hourly by database.sync-backups with the complete list of Backup
objects for the database, so scheduled operator backups show up next to
manual ones and retention-pruned backups disappear.

## Path parameters

- `database_id` string, uuid, required

## Headers

- `x-service-token` string, required

## Request body

- BackupSyncRequest
  - `backups` ObservedBackup[], required
    - `k8s_name` string, required
    - `backup_type` string
    - `status` string, required
    - `started_at` string, date-time, nullable
    - `completed_at` string, date-time, nullable
    - `created_at` string, date-time, nullable
    - `s3_path` string, nullable
    - `size_bytes` integer, nullable
    - `error_message` string, nullable
    - `barman_backup_id` string, nullable
    - `barman_server_name` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/mengi/apis/mengi-cloud.md) · [All operations](https://skmtc.dev/mengi/apis/mengi-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/mengi/apis/mengi-cloud/revisions/70dc8775b002?raw)
