Docs/Guides/Backups & restore

Backups & restore

On-demand backups

curl -X POST .../databases/$DATABASE_ID/backups -H "Authorization: Bearer $TOKEN"
# 202 Accepted, returns a job_id — same async pattern as everything else.
curl .../databases/$DATABASE_ID/backups -H "Authorization: Bearer $TOKEN"       # list
curl .../databases/$DATABASE_ID/backups/$BACKUP_ID -H "Authorization: Bearer $TOKEN"  # detail

Restoring

A restore creates a new database from a backup — it never overwrites the original:

curl -X POST .../databases/$DATABASE_ID/backups/$BACKUP_ID/restore \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "production-restored"}'
# 202 Accepted — poll the job, then the new database appears in the project's list.

Backup policy

Each database has an automatic backup policy, readable and configurable:

curl .../databases/$DATABASE_ID/backup-policy -H "Authorization: Bearer $TOKEN"

curl -X PUT .../databases/$DATABASE_ID/backup-policy \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"enabled": true, "frequency_hours": 24, "retention_days": 7}'
FieldDefaultRange
enabledtrue—
frequency_hours241 – 720
retention_days71 – 365

Backups older than retention_days are cleaned up automatically.