Skip to Content

Backups

Backup management for databases, volumes, and buckets. Supports S3-compatible storage destinations, scheduled backups, and point-in-time recovery (PITR) for PostgreSQL.

Backup Destinations

Configure where backups are stored.

MethodPathDescription
GET/api/v1/settings/backup-destinationsList destinations
POST/api/v1/settings/backup-destinationsCreate destination
GET/api/v1/settings/backup-destinations/:idGet destination
PUT/api/v1/settings/backup-destinations/:idUpdate destination
DELETE/api/v1/settings/backup-destinations/:idDelete destination

Create Destination

{ "name": "s3-backups", "provider": "s3", "access_key": "AKIAIOSFODNN7EXAMPLE", "secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", "bucket": "my-backups", "region": "us-east-1", "endpoint": "https://s3.amazonaws.com" }

Providers: s3, r2 (Cloudflare), backblaze, minio, custom

For Cloudflare R2, also provide account_id and optionally jurisdiction.


Database Backups

MethodPathDescription
GET/api/v1/databases/:id/backupsList backups
POST/api/v1/databases/:id/backupsCreate manual backup
GET/api/v1/databases/:id/recovery-windowGet PITR recovery window
POST/api/v1/databases/:id/restoreRestore from backup
POST/api/v1/databases/:id/pitrPoint-in-time recovery
POST/api/v1/databases/:id/pitr-cloneClone from PITR snapshot
POST/api/v1/databases/:id/switchSwitch to restored database
POST/api/v1/databases/:id/importImport SQL dump
POST/api/v1/databases/:id/restore-from-pathRestore from file path

PITR Restore

Restore a PostgreSQL database to a specific point in time:

POST /api/v1/databases/:id/pitr { "target_time": "2024-01-15T10:30:00Z" }

PITR Clone

Create a new database from a point-in-time snapshot:

POST /api/v1/databases/:id/pitr-clone { "target_time": "2024-01-15T10:30:00Z", "new_name": "my-db-clone" }

Volume & Bucket Backups

MethodPathDescription
POST/api/v1/backups/database/:id/restoreRestore database backup by backup ID
POST/api/v1/backups/volume/:id/restoreRestore volume backup by backup ID
POST/api/v1/backups/volume/:id/cloneClone volume to new workload
GET/api/v1/applications/:id/volume-backupsList volume backups for an app
POST/api/v1/applications/:id/volume-backupsCreate volume backup for an app

Backup Schedules

Automate backups with cron schedules.

MethodPathDescription
GET/api/v1/backup-schedulesList schedules
POST/api/v1/backup-schedulesCreate schedule
GET/api/v1/backup-schedules/:idGet schedule
PUT/api/v1/backup-schedules/:idUpdate schedule
DELETE/api/v1/backup-schedules/:idDelete schedule
POST/api/v1/backup-schedules/:id/runRun schedule immediately

Create Schedule

{ "database_id": "uuid", "destination_id": "uuid", "cron_expression": "0 2 * * *", "retention_count": 7 }

Use database_id for database backups or application_id for volume backups (mutually exclusive).

Last updated on