Get your free beta license ↗
API operation · backups group
GET

/backups

First published 3 Oct 20260.1.0Unchanged since publication

Get the server's backup status

Who may call it
AdministratorResellerCustomer
Token scope, any of
backupsreadall
Answers200 OK

The response contains the server's backup status in backups. The enabled field reflects backups.enabled, which is off on a new installation. Existing day folders are retained while nightly backups are off. The status also reports whether backups.nights_for_customers makes nightly backups visible to customers. The response includes keep_days, hour, min_free_percent, skip_suspended, include_customer_backups and off_dismissed. The remote object reports the host, user, path, port, keep_days, configured, public key and recorded host key for remote backups.

The default backups.dir is /backups, owned by root with mode 0700. The response gives the backup directory in dir and includes a dir_error message if the directory check fails. It lists day folders newest first, with each customer's archive and its size, and indicates whether server.json is present. A .part file is still being written or was left by an interrupted run.

The response gives each customer's nightly backup switch and the number of days with an archive for that customer. It compares free space on the backup filesystem with backups.min_free_percent and reports the last completed run and any run in progress. A completed run is marked clean if it archived every customer included in the run. The API returns 403 if the caller lacks administrator privileges.

As a command

Run as root on the server

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X GET "$API/backups" \
  -H "Authorization: Bearer $TOKEN"
Response · 200 OK
{
  "backups": {
    "customers": [
      {
        "backups": true,
        "days": 1,
        "latest": {
          "day": "2026-09-09",
          "modified_at": "text",
          "size": 1
        },
        "name": "alice",
        "status": "active"
      }
    ],
    "days": [
      {
        "archives": [
          {
            "in_progress": true,
            "modified_at": "text",
            "name": "alice",
            "size": 1,
            "user": "alice"
          }
        ],
        "bytes": 1,
        "day": "2026-09-09",
        "server_json": true
      }
    ],
    "dir": "text",
    "dir_error": "text",
    "enabled": true,
    "filesystem": {
      "below_reserve": true,
      "free_bytes": 1,
      "percent": 1,
      "reserve_bytes": 1,
      "size_bytes": 1
    },
    "hour": "text",
    "in_flight": {
      "created_at": "2026-09-09T10:15:00Z",
      "id": 1,
      "status": "active"
    },
    "include_customer_backups": true,
    "keep_days": 1,
    "last_run": {
      "archived": 1,
      "bytes": 1,
      "clean": true,
      "day": "2026-09-09",
      "error": "Domain 'example.com' already exists",
      "failed": 1,
      "finished_at": "2026-09-09T10:15:04Z",
      "id": 1,
      "refused": 1,
      "remote": {
        "bytes": 1,
        "configured": true,
        "error": "Domain 'example.com' already exists",
        "failed": 1,
        "finished_at": "2026-09-09T10:15:04Z",
        "ok": true,
        "removed_days": 1,
        "seconds": 1,
        "sent": 1
      },
      "removed_days": 1,
      "skipped": 1,
      "started_at": "2026-09-09T10:15:01Z",
      "status": "done"
    },
    "min_free_percent": 1,
    "nights_for_customers": true,
    "off_dismissed": true,
    "remote": {
      "configured": true,
      "host": "text",
      "host_key": {
        "fingerprint": "text",
        "name": "alice",
        "type": "rebuild"
      },
      "keep_days": 1,
      "keep_days_own": true,
      "key_fingerprint": "text",
      "path": "public_html/index.php",
      "port": 8443,
      "public_key": "text",
      "user": "alice"
    },
    "skip_suspended": true
  }
}

Errors

2 errors, each a status and a sentence
401Authentication required
403Insufficient privileges
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/get-backups/