---
search:
  tags:
    - console-backup
    - PUT
seo:
  description: >-
    Replaces the cron expression, the target, the tiers… Reference for the PUT
    /api/v1/console-backup/schedules/{id} endpoint in the TimescaleDB Enterprise
    API.
  noindex: true
sidebar:
  label: Change a backup schedule
  badge: PUT
title: Change a backup schedule
type: openapi-operation
---
Replaces the cron expression, the target, the tiers and the on/off flag. The archives of the schedule stay on the old target.

`PUT /api/v1/console-backup/schedules/{id}`

**Request body** (`application/json`, required)

- `cron` (string, required) — A cron expression of 5 fields (minute hour day-of-month month day-of-week), in UTC. No descriptor such as @daily and no time zone
- `enabled` (boolean, required) — false: the schedule does not run
- `keep_count` (integer<int64>, required) — After each successful run, keep the newest archives of the schedule on its target. 0: no count limit. The retention never deletes the newest successful archive, a manual archive or an archive of another console
- `max_age_days` (integer<int64>, required) — After each successful run, delete the archives of the schedule on its target that are older. 0: no age limit. Not 0 together with keep\_count
- `target_id` (string, required)
- `tiers` (string[], required) — The tiers of the archives. core is always in. logs adds the logs of the finished workflows. packs adds the loaded server packs, not the packs of the image. metrics adds the Prometheus data. A tier that this release cannot back up gives 422 (size-estimate shows the available tiers)

Request body example:

```json
{
  "cron": "string",
  "enabled": true,
  "keep_count": 0,
  "max_age_days": 0,
  "target_id": "string",
  "tiers": [
    "core"
  ]
}
```

**Responses**

- `200` — OK
- `default` — Error

Response example, 200:

```json
{
  "created_at": "2019-08-24T14:15:22Z",
  "cron": "string",
  "enabled": true,
  "id": "string",
  "keep_count": 0,
  "max_age_days": 0,
  "next_runs": [
    "2019-08-24T14:15:22Z"
  ],
  "target_id": "string",
  "tiers": [
    "string"
  ],
  "updated_at": "2019-08-24T14:15:22Z"
}
```
