Update database backup target
Update a backup target of a database. Only the provided fields are changed. Changing connection fields switches the target between Sevalla object storage and external S3 storage. The new configuration is applied to the database asynchronously. The database and its backups must be in a ready state. Databases that do not support external backups return a 400.
Authorizations
API key authentication. Pass your API key as a Bearer token in the Authorization header.
Path Parameters
Database identifier
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"fb5e5168-4281-4bec-94c5-0d1584e9e657"
Backup target identifier
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"fb5e5168-4281-4bec-94c5-0d1584e9e657"
Body
New human-readable name for the backup target
1 - 200"Daily offsite"
New cron schedule for automatic dump backups, in standard 5-field cron syntax (UTC). The schedule cannot run more often than every 30 minutes. Pass null to switch back to the automatically assigned daily time.
^\S+ \S+ \S+ \S+ \S+$"15 3 * * *"
Enable or disable automatic scheduled backups to this target
true
Days automatic backups are kept before being pruned
1 <= x <= 3657
Days manual backups are kept before being pruned. 0 keeps them forever.
0 <= x <= 36514
New object key prefix for the dump files inside the bucket. Pass null to switch back to the default per-database prefix. Existing backups under the old prefix become invisible to the backup list.
1 - 512"my-app/db-backups"
Identifier of a Sevalla object storage bucket to switch this target to. Provide either this field or the external S3 connection fields, not both.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"fb5e5168-4281-4bec-94c5-0d1584e9e657"
Name of the external S3 bucket to switch this target to, together with access_key and secret_key
1 - 255"my-backups"
S3-compatible endpoint URL of the external storage
"https://account.r2.cloudflarestorage.com"
Region of the external storage
1 - 64"us-east-1"
Access key for the external storage. Stored encrypted and never returned.
1"AKIA..."
Secret key for the external storage. Stored encrypted and never returned.
1"wJalr..."
Response
Default Response
Backup target identifier
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"fb5e5168-4281-4bec-94c5-0d1584e9e657"
System-generated slug of the backup target, used in dump file names and the backup schedule job name
"daily-offsite"
Human-readable name of the backup target
"Daily offsite"
Cron schedule of the automatic dump backups, in standard 5-field cron syntax (UTC). Null means a daily run at a stable, automatically assigned time between 00:00 and 05:59 UTC.
"15 3 * * *"
Whether automatic scheduled backups to this target are enabled
true
Days automatic backups are kept in the bucket before being pruned
7
Days manual backups are kept in the bucket before being pruned. 0 keeps manual backups forever.
14
Object key prefix for the dump files inside the bucket. Null uses the default per-database prefix.
"my-app/db-backups"
Identifier of the Sevalla object storage bucket this target uploads to. Null when the target uses external S3-compatible storage with customer-provided credentials.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"fb5e5168-4281-4bec-94c5-0d1584e9e657"
Name of the destination bucket
"my-backups"
S3-compatible endpoint URL of the destination storage
"https://account.r2.cloudflarestorage.com"
Region of the destination storage
"auto"
Timestamp when the backup target was created, in ISO 8601 format
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$"2025-01-30T00:00:00.000Z"
Timestamp when the backup target was last updated, in ISO 8601 format
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$"2025-01-30T00:00:00.000Z"