PUT/databases/{uuid}/storages/{storage_uuid}/backups

Set a database storage backup schedule

Creates or replaces the backup schedule for a database persistent volume or directory storage. Set frequency and configure retention, local backup, and S3 destinations as needed. Enabling stop_during_backup requires a token with the deploy permission.

2 parameters · 15 body fields
uuidstringrequired
The UUID of the database whose storage backup schedule you are setting.
storage_uuidstringrequired
The UUID of the persistent volume or directory storage whose backup schedule you are setting.

Backup schedule configuration for the database storage. frequency is required; only the listed fields are accepted.

disable_local_backupbooleanoptional
Whether to disable local backups. Defaults to false when omitted.
Default:false
enabledbooleanoptional
Whether the backup schedule is enabled. Defaults to true when omitted.
Default:true
frequencystringrequired
The backup schedule frequency. Maximum 255 characters.
missing_backup_notification_daysintegeroptional
Alert after this many days without an execution; 0 disables alerts
Default:0
retention_amount_locallyintegeroptional
Maximum number of local backups to retain. Must be between 0 and 10000. Defaults to 7 when omitted.
Default:7
retention_amount_s3integeroptional
Maximum number of S3 backups to retain. Must be between 0 and 10000. Defaults to 7 when omitted.
Default:7
retention_days_locallyintegeroptional
Maximum age of local backups to retain, in days. Must be between 0 and 2147483647. Defaults to 0 when omitted.
Default:0
retention_days_s3integeroptional
Maximum age of S3 backups to retain, in days. Must be between 0 and 2147483647. Defaults to 0 when omitted.
Default:0
retention_max_storage_locallynumberoptional
Maximum storage allowed for local backups. Must be between 0 and 9999999999. Defaults to 0 when omitted.
Default:0
retention_max_storage_s3numberoptional
Maximum storage allowed for S3 backups. Must be between 0 and 9999999999. Defaults to 0 when omitted.
Default:0
s3_storage_uuidstringoptional
Primary S3 storage UUID. Sent without s3_storage_uuids, it selects this storage as the only destination.
s3_storage_uuidsarray<string>optional
UUIDs of every S3 storage the backup is uploaded to. 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_s3 requires at least one destination.
save_s3booleanoptional
Whether to upload backups to S3. Defaults to false when omitted.
Default:false
stop_during_backupbooleanoptional
Stop the resource containers during the backup. Needs a token with the deploy permission.
Default:false
timeoutintegeroptional
The backup timeout. Must be between 60 and 36000. Defaults to 36000 when omitted.
Default:36000

7 status codes
200Returns the replaced backup schedule, including its configuration, message, and database storage identifiers.
disable_local_backupbooleanrequired
enabledbooleanrequired
frequencystringrequired
messagestringrequired
missing_backup_notification_daysintegerrequired
retention_amount_locallyintegerrequired
retention_amount_s3integerrequired
retention_days_locallyintegerrequired
retention_days_s3integerrequired
retention_max_storage_locallynumberrequired
retention_max_storage_s3numberrequired
s3_storage_uuidstringoptional
Primary S3 destination.
s3_storage_uuidsarray<string>optional
Every S3 destination, primary first.
save_s3booleanrequired
stop_during_backupbooleanrequired
storage_typestringrequired
Allowed:persistentdirectory
storage_uuidstringrequired
timeoutintegerrequired
uuidstringrequired
201Returns the created backup schedule, including its configuration, message, and database storage identifiers.
disable_local_backupbooleanrequired
enabledbooleanrequired
frequencystringrequired
messagestringrequired
missing_backup_notification_daysintegerrequired
retention_amount_locallyintegerrequired
retention_amount_s3integerrequired
retention_days_locallyintegerrequired
retention_days_s3integerrequired
retention_max_storage_locallynumberrequired
retention_max_storage_s3numberrequired
s3_storage_uuidstringoptional
Primary S3 destination.
s3_storage_uuidsarray<string>optional
Every S3 destination, primary first.
save_s3booleanrequired
stop_during_backupbooleanrequired
storage_typestringrequired
Allowed:persistentdirectory
storage_uuidstringrequired
timeoutintegerrequired
uuidstringrequired
400Returned when the token is invalid.
messagestringoptional
401Returned when the request is unauthenticated.
messagestringoptional
403Returned when access is forbidden or the token lacks the deploy permission required for `stop_during_backup`.
404Returned when the database or storage resource is not found.
messagestringoptional
422Returned when the request fails validation.
errorsobjectoptional
messagestringoptional

Error handling

A 400 indicates an invalid token, a 401 indicates an unauthenticated request, and a 403 indicates forbidden access or missing deploy permission when stop_during_backup is enabled. A 404 indicates that a resource was not found, and a 422 indicates validation failure; the uuid path parameter and storage_uuid path parameter must identify the database and storage. frequency is required, numeric values must stay within their schema ranges, and s3_storage_uuids must include at least one destination when save_s3 is true.