Resource Backups
Manage backup schedules for applications, services, and databases. Resource backups capture volumes, configuration, or complete snapshots on a cron schedule, with optional upload to S3 storage.
This is separate from database-native backups (pg_dump, mysqldump). Resource backups capture Docker volumes and container configuration at the infrastructure level.
List Backup Schedules
GET /api/v1/resource-backups
| Parameter | Type | Description |
|---|---|---|
resource_type | string | Filter: application, service, or database |
resource_id | integer | Filter by resource ID |
Response:
{
"data": [
{
"id": 1,
"resource_type": "App\\Models\\Application",
"resource_id": 42,
"backup_type": "full",
"frequency": "0 2 * * *",
"s3_storage_id": 1,
"enabled": true,
"keep_locally": true,
"number_of_backups_locally": 5,
"created_at": "2024-06-01T08:00:00Z"
}
]
}
Create Backup Schedule
POST /api/v1/resource-backups
{
"resource_type": "application",
"resource_id": 42,
"backup_type": "full",
"frequency": "0 2 * * *",
"s3_storage_id": 1,
"enabled": true,
"keep_locally": true,
"number_of_backups_locally": 5
}
| Parameter | Type | Required | Description |
|---|---|---|---|
resource_type | string | Yes | application, service, database, or coolify_instance |
resource_id | integer | Yes* | Resource ID (*not required for coolify_instance) |
backup_type | string | Yes | volume, configuration, full, or coolify_instance |
frequency | string | Yes | Cron expression (e.g., 0 2 * * * for daily at 2 AM) |
s3_storage_id | integer | No | S3 storage destination for remote upload |
enabled | boolean | No | Enable the schedule (default: true) |
keep_locally | boolean | No | Keep local backup copy (default: true) |
number_of_backups_locally | integer | No | Number of local backups to retain |
Backup Types
| Type | What's Captured |
|---|---|
volume | Docker persistent volumes attached to the resource |
configuration | Environment variables, Docker Compose files, resource settings |
full | Both volumes and configuration in a single archive |
coolify_instance | Full Coolify instance backup (database, config, SSH keys) |
Response: 201 Created
{
"message": "Resource backup schedule created.",
"data": {
"id": 1,
"resource_type": "App\\Models\\Application",
"resource_id": 42,
"backup_type": "full",
"frequency": "0 2 * * *",
"enabled": true
}
}
Get Backup Schedule
Returns schedule details with recent execution history:
GET /api/v1/resource-backups/{id}
Response:
{
"id": 1,
"resource_type": "App\\Models\\Application",
"resource_id": 42,
"backup_type": "full",
"frequency": "0 2 * * *",
"enabled": true,
"executions": [
{
"id": 10,
"status": "success",
"filename": "backup-2024-06-15.tar.gz",
"size": 1048576,
"is_encrypted": true,
"created_at": "2024-06-15T02:00:00Z"
},
{
"id": 9,
"status": "success",
"filename": "backup-2024-06-14.tar.gz",
"size": 1024000,
"is_encrypted": true,
"created_at": "2024-06-14T02:00:00Z"
}
]
}
Update Backup Schedule
PUT /api/v1/resource-backups/{id}
{
"frequency": "0 3 * * *",
"enabled": false,
"number_of_backups_locally": 10
}
Delete Backup Schedule
DELETE /api/v1/resource-backups/{id}
Response:
{
"message": "Resource backup schedule deleted."
}
Deleting a schedule does not remove existing backup files. Previously created backups remain on disk and in S3 storage.
Execute Backup Now
Trigger an immediate backup execution outside the cron schedule:
POST /api/v1/resource-backups/{id}/execute
Response:
{
"message": "Backup job dispatched."
}
The backup runs asynchronously. Check the schedule's executions to monitor progress.
Encryption
When S3 storage has encryption enabled, backups are automatically encrypted using rclone's crypt backend (NaCl SecretBox). The is_encrypted field in execution records indicates whether encryption was applied.
Configure S3 encryption from the dashboard under Settings > S3 Storage > Encryption.