---
title: "Update a backup schedule"
method: PATCH
path: "/instances/{instanceId}/backup-schedules/{id}"
tags: ["Backup Schedules"]
---

# Update a backup schedule

`PATCH /instances/{instanceId}/backup-schedules/{id}`

## Request

- Base URL: `https://api.cloudpepper.io`
- URL: `https://api.cloudpepper.io/instances/{instanceId}/backup-schedules/{id}`
- Auth: HTTP bearer

Modifies an existing backup schedule for an instance. This allows you to change the backup frequency, retention policy, or assigned backup provider without removing and recreating the schedule. Only the fields you specify will be updated; other fields will retain their current values.

**Key Parameters:**
- `instanceId`: The unique identifier of the instance containing the backup schedule
- `id`: The unique identifier of the backup schedule to update
- `schedule`: Optional new cron expression defining when the backup should run
  - Format: 'minute hour day-of-month month day-of-week' (e.g., '00 08 * * *' for daily at 8:00 AM UTC)
  - Special values supported:
    - '@monthly' or '00 00 1 * *' (first day of month at midnight)
    - '@weekly' or '00 00 * * 0' (Sunday at midnight)
    - '@daily', '@midnight' or '00 00 * * *' (daily at midnight)
    - '@hourly' or '00 * * * *' (hourly at minute 00)
  - Interval patterns supported:
    - '00 */12 * * *' (every 12 hours)
    - '00 */6 * * *' (every 6 hours)
    - '00 */3 * * *' (every 3 hours)
- `retention`: Optional new retention period in days
- `providerId`: Optional new backup provider ID

**NOTE:** You can update any combination of the available fields. For example, you can change just the retention period while keeping the same schedule, or update both the schedule and provider while keeping the same retention policy.

## Request body

- object
  - `schedule` string: New cron expression defining when the backup should run. Format: 'minute hour day-of-month month day-of-week'. Also supports special values like @daily, @weekly, @monthly.
  - `retention` integer: New retention period in days
  - `providerId` string, uuid, nullable: New backup provider ID (or null to use the default provider)

## Response `200`

Backup schedule updated successfully

## Other responses

- `403`: Insufficient permissions
- `404`: Instance or backup schedule not found

---

[API](https://skmtc.dev/cloudpepper/apis/cloudpepper-api-docs.md) · [All operations](https://skmtc.dev/cloudpepper/apis/cloudpepper-api-docs/llms.txt) · [OpenAPI document](https://skmtc.dev/cloudpepper/apis/cloudpepper-api-docs/revisions/b6a59274cedc?raw)
