Skip to content

Update VPS backup settings

PATCH /api/v2/vps/{id}/backup-schedules

Changes the backup settings of a VPS. It does not change the schedule. Use POST /api/v2/vps/{id}/backup-schedules for that. Send at least one field. With autoDeleteOldest: true, a scheduled backup that needs room first deletes the oldest scheduled backups. Those backups are gone for good. Manual backups are never deleted this way. With autoDeleteOldest: false, a scheduled backup is skipped when there is no room. maxTotalBackups does not raise the backup allowance of the plan. When the plan includes an allowance, the next GET /api/v2/vps/{id}/backup-schedules sets totalBackupLimit back to it.

Authentication: An API key with the scopes write:vm and vm:write. About keys and scopes

Request

Path parameters

idstringrequired
The VPS ID (vps_…).

Body

maxTotalBackupsnumber
Most backups to keep for this VPS, manual and scheduled together. At least 1. At least 1.
autoDeleteOldestboolean
Delete the oldest scheduled backups when a new scheduled backup needs room. With false, that scheduled backup is skipped.

Example

PATCH /api/v2/vps/{id}/backup-schedules
curl -X PATCH "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/backup-schedules" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"autoDeleteOldest": true
}'

Responses

200 The updated backup settings.

Response 200
{
"settings": {
"totalBackupLimit": 5,
"manualBackupsActive": 1,
"scheduledBackupsActive": 2,
"availableScheduledSlots": 2,
"autoDeleteOldest": true
}
}
Response fields
settingsobject
totalBackupLimitinteger
Most backups kept for this VPS, manual and scheduled together.
manualBackupsActiveinteger
Manual backups stored now.
scheduledBackupsActiveinteger
Scheduled backups stored now.
availableScheduledSlotsinteger
Backups the schedule can still keep next to the manual ones.
autoDeleteOldestboolean
Whether the oldest scheduled backups are deleted when a new scheduled backup needs room.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller; code is vps_not_found.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.
502Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists.