Coolify logoCoolify
POST
/databases/{uuid}/backups

Create a new scheduled backup configuration for a database

Authorization

bearerAuth
AuthorizationBearer <token>

Go to Keys & Tokens / API tokens and create a new token. Use the token as the bearer token.

In: header

Path Parameters

uuid*string

UUID of the database.

Request Body

application/json

Backup configuration data

TypeScript Definitions

Use the request body type in TypeScript.

frequency*string

Backup frequency (cron expression or: every_minute, hourly, daily, weekly, monthly, yearly)

enabled?boolean

Whether the backup is enabled

Defaulttrue
save_s3?boolean

Whether to save backups to S3

Defaultfalse
s3_storage_uuid?string

S3 storage UUID (required if save_s3 is true)

databases_to_backup?string

Comma separated list of databases to backup

dump_all?boolean

Whether to dump all databases

Defaultfalse
backup_now?boolean

Whether to trigger backup immediately after creation

database_backup_retention_amount_locally?integer

Number of backups to retain locally

database_backup_retention_days_locally?integer

Number of days to retain backups locally

database_backup_retention_max_storage_locally?integer

Max storage (MB) for local backups

database_backup_retention_amount_s3?integer

Number of backups to retain in S3

database_backup_retention_days_s3?integer

Number of days to retain backups in S3

database_backup_retention_max_storage_s3?integer

Max storage (MB) for S3 backups

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://app.coolify.io/api/v1/databases/string/backups" \  -H "Content-Type: application/json" \  -d '{    "frequency": "string"  }'
{  "uuid": "550e8400-e29b-41d4-a716-446655440000",  "message": "Backup configuration created successfully."}
{  "message": "Invalid token."}
{  "message": "Unauthenticated."}
{  "message": "Resource not found."}
{  "message": "Validation error.",  "errors": {    "name": [      "The name field is required."    ],    "api_url": [      "The api url field is required.",      "The api url format is invalid."    ]  }}