POST
/databases/{uuid}/backupsCreate Backup
Create a new scheduled backup configuration for a database
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
uuidstringrequired
UUID of the database.
Backup configuration data
backup_nowbooleanoptional
Whether to trigger backup immediately after creation. Needs a token with the deploy permission.
database_backup_retention_amount_locallyintegeroptional
Number of backups to retain locally
database_backup_retention_amount_s3integeroptional
Number of backups to retain in S3
database_backup_retention_days_locallyintegeroptional
Number of days to retain backups locally
database_backup_retention_days_s3integeroptional
Number of days to retain backups in S3
database_backup_retention_max_storage_locallynumberoptional
Max storage (GB) for local backups
database_backup_retention_max_storage_s3numberoptional
Max storage (GB) for S3 backups
databases_to_backupstringoptional
Comma separated list of databases to backup
disable_local_backupbooleanoptional
Delete the local backup file after the upload to S3. Only allowed when save_s3 is true.
dump_allbooleanoptional
Whether to dump all databases
enabledbooleanoptional
Whether the backup is enabled
frequencystringrequired
Backup frequency (cron expression or: every_minute, hourly, daily, weekly, monthly, yearly)
missing_backup_notification_daysintegeroptional
Alert after this many days without an execution; 0 disables alerts
s3_storage_uuidstringoptional
Primary S3 storage UUID. Sent without s3_storage_uuids, it selects this storage as the only destination. Either field is required if save_s3 is true.
s3_storage_uuidsarray<string>optional
UUIDs of every S3 storage the backup is uploaded to. Replaces the current destinations. When s3_storage_uuid is also sent, it must be in this list and becomes the primary destination; otherwise the first entry is the primary destination.
save_s3booleanoptional
Whether to save backups to S3
timeoutintegeroptional
Backup job timeout in seconds (min: 60, max: 36000)
201Backup configuration created successfully
messagestringoptional
uuidstringoptional
400Invalid token.
messagestringoptional
401Unauthenticated.
messagestringoptional
403The token needs the deploy permission to use backup_now.
404Resource not found.
messagestringoptional
422Validation error.
errorsobjectoptional
messagestringoptional
Error handling
A 400 is returned: Invalid token. A 401 is returned: Unauthenticated. A 403 is returned: The token needs the deploy permission to use backup_now. A 404 is returned: Resource not found. A 422 is returned: Validation error.