Skip to main content
PUT
Update database backup target

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token in the Authorization header.

Path Parameters

id
string<uuid>
required

Database identifier

Pattern: ^([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)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

target_id
string<uuid>
required

Backup target identifier

Pattern: ^([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)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

Body

application/json
display_name
string

New human-readable name for the backup target

Required string length: 1 - 200
Example:

"Daily offsite"

schedule
string | null

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.

Pattern: ^\S+ \S+ \S+ \S+ \S+$
Example:

"15 3 * * *"

is_enabled
boolean

Enable or disable automatic scheduled backups to this target

Example:

true

retention_days
integer

Days automatic backups are kept before being pruned

Required range: 1 <= x <= 365
Example:

7

manual_retention_days
integer

Days manual backups are kept before being pruned. 0 keeps them forever.

Required range: 0 <= x <= 365
Example:

14

prefix
string | null

New object key prefix for the dump files inside the bucket. Pass null to switch back to the default per-database prefix. A custom prefix gets the database folder (<database name>-<database type>) appended unless it already ends with it, so two databases never share a dump path. Trailing slashes are removed, and a prefix made only of slashes uses the default. "." and ".." path segments are not allowed. Existing backups under the old prefix become invisible to the backup list.

Required string length: 1 - 512
Example:

"my-app/db-backups"

object_storage_id
string<uuid>

Identifier of a Sevalla object storage bucket to switch this target to. Provide either this field or the external S3 connection fields, not both.

Pattern: ^([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)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

bucket_name
string

Name of the external S3 bucket to switch this target to, together with access_key and secret_key

Required string length: 1 - 255
Example:

"my-backups"

endpoint
string<uri>

S3-compatible endpoint URL of the external storage. It must resolve to public IP addresses - private, loopback and link-local addresses are rejected with a 400.

Example:

"https://account.r2.cloudflarestorage.com"

region
string

Region of the external storage

Required string length: 1 - 64
Example:

"us-east-1"

access_key
string

Access key for the external storage. Stored encrypted and never returned.

Minimum string length: 1
Example:

"AKIA..."

secret_key
string

Secret key for the external storage. Stored encrypted and never returned.

Minimum string length: 1
Example:

"wJalr..."

Response

Default Response

id
string<uuid>
required

Backup target identifier

Pattern: ^([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)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

name
string
required

System-generated slug of the backup target, used in dump file names and the backup schedule job name

Example:

"daily-offsite"

display_name
string
required

Human-readable name of the backup target

Example:

"Daily offsite"

schedule
string | null
required

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.

Example:

"15 3 * * *"

is_enabled
boolean
required

Whether automatic scheduled backups to this target are enabled

Example:

true

retention_days
number
required

Days automatic backups are kept in the bucket before being pruned

Example:

7

manual_retention_days
number
required

Days manual backups are kept in the bucket before being pruned. 0 keeps manual backups forever.

Example:

14

prefix
string | null
required

Object key prefix for the dump files inside the bucket. Null uses the default per-database prefix.

Example:

"my-app/db-backups"

object_storage_id
string<uuid> | null
required

Identifier of the Sevalla object storage bucket this target uploads to. Null when the target uses external S3-compatible storage with customer-provided credentials.

Pattern: ^([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)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

bucket_name
string
required

Name of the destination bucket

Example:

"my-backups"

endpoint
string | null
required

S3-compatible endpoint URL of the destination storage

Example:

"https://account.r2.cloudflarestorage.com"

region
string | null
required

Region of the destination storage

Example:

"auto"

created_at
string<date-time>
required

Timestamp when the backup target was created, in ISO 8601 format

Pattern: ^(?:(?:\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))$
Example:

"2025-01-30T00:00:00.000Z"

updated_at
string<date-time>
required

Timestamp when the backup target was last updated, in ISO 8601 format

Pattern: ^(?:(?:\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))$
Example:

"2025-01-30T00:00:00.000Z"