Skip to content

backups ​

← All modules

5 endpoints.

GET /api/v1/backups ​

Overview

Settings, the last run in full, the recent run history, and the schedule that runs it.

200 — Successful Response

json
{
  "additionalProperties": true,
  "type": "object",
  "title": "Response Overview Api V1 Backups Get"
}

POST /api/v1/backups/run ​

Run Now

Run the nightly backup now and return its summary.

Synchronous on purpose: the caller asked for a backup and the useful answer is whether it worked, which is only knowable when it finishes. A run that raises (a failed dump, a failed push) is reported as a 502 carrying the reason — the same failure the scheduler would record — with the summary still written to the history by run() itself.

200 — Successful Response

json
{
  "additionalProperties": true,
  "type": "object",
  "title": "Response Run Now Api V1 Backups Run Post"
}

GET /api/v1/backups/site ​

Instance Overview

The same nightly run, seen from ONE site — whichever site is asking.

The endpoint behind the per-site Site Backups module, which exists because the estate console moved to Hub Manager on 2026-08-24 and Hub Manager is hub-only (reconcile_hub_only_menu deletes its rows off every spoke). Fifteen sites would otherwise have had a Daily Backup switch and no page anywhere that says what it did — the same "a switch is the only visible part of the system" hole this whole module was built to close, reopened one level down.

Scoped to the SELECTED site (owner, 2026-09-11: "all reads must be done based on the site selected, not the url"): on the hub with the switcher on Telecloud this is Telecloud's dump, not lubb's. books_switch.wanted applies the licence and membership gates and is None for no header or the home site, so it can only name a site the caller could already open; never a free query parameter.

200 — Successful Response

json
{
  "additionalProperties": true,
  "type": "object",
  "title": "Response Instance Overview Api V1 Backups Site Get"
}

GET /api/v1/backups/vm/{ip} ​

Vm Backup

A Hyper-V VM row's Server Backup & Sync form: its settings and the backup status emails accounts@ received about it (see :mod:app.apps.instances.services.vm_backup_mail).

Parameters

NameInRequiredTypeDescription
ippathyesstring
hostnamequerynostring
daysquerynointeger

200 — Successful Response

json
{
  "type": "object",
  "additionalProperties": true,
  "title": "Response Vm Backup Api V1 Backups Vm  Ip  Get"
}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

PUT /api/v1/backups/vm/{ip} ​

Vm Backup Save

Save the form: the names this VM goes by in backup emails, how often a report must arrive, and whether its failures alert.

Parameters

NameInRequiredTypeDescription
ippathyesstring

Request body

json
{
  "type": "object",
  "additionalProperties": true,
  "title": "Payload"
}

200 — Successful Response

json
{
  "type": "object",
  "additionalProperties": true,
  "title": "Response Vm Backup Save Api V1 Backups Vm  Ip  Put"
}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

Lubb Business Documentation