Docs Home Return to Homepage
Get Started Login

Replace Snapshot Schedules

Last updated Changelog

On this page
http
PUT /crates/{handle}/snapshot-schedules

Replaces all of the crate’s schedules with the ones sent, in one change; {"schedules": []} removes them all. Snapshots already taken stay until you delete them. A target can have one schedule of each frequency (422 for a second). Together the schedules can keep up to the plan’s snapshot limit (400 past it); what’s left is room for manual snapshots.

Parameters

Field Type Required Description
schedules array Yes Up to 20 schedules, each with the fields below
schedules[].target string No crate (the default) for every folder at once, or a folder’s name
schedules[].frequency string Yes daily, weekly or monthly
schedules[].time string Yes 24-hour UTC time, like 03:00
schedules[].weekday integer Weekly 0 (Sunday) to 6
schedules[].month_day integer Monthly 1 to 28, so every month has it
schedules[].keep integer Yes How many of its snapshots to keep (at least 1)
json
{
  "schedules": [
    { "target": "crate", "frequency": "daily", "time": "03:00", "keep": 7 },
    { "target": "backups", "frequency": "monthly", "time": "02:00", "month_day": 1, "keep": 3 }
  ]
}

Response

json
{ "message": "Schedules saved." }

Errors

Besides the errors any endpoint can return:

Status Code When
400 limit_reached The plan allows no more of this (domains, databases, sub-users, snapshots, keys).
400 operation_rejected The server behind the API (mail, database, storage) or the registrar refused the operation. error says why.
403 not_in_plan This plan doesn’t include snapshots.
403 scope_denied This API key does not have Crates write access for this crate.
403 service_inactive This crate is not active.
404 not_found Crate not found.
502 upstream_unavailable This crate has no storage node.

Snagged on something?

Our sysadmins answer tickets around the clock.