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

/backups/run

First published 3 Oct 20260.1.0Unchanged since publication

Queue a server backup run

Who may call it
AdministratorResellerCustomer
Token scope, any of
backupsall
Answers202 Accepted

The response contains the queued job in job. A full run uses the same process as the scheduled nightly run. It writes one archive per eligible customer beside server.json in the day folder under backups.dir, then removes days beyond backups.keep_days. Repeating a full run for the same day replaces that day's archives.

Use day in YYYY-MM-DD format to select the backup day. Use user to back up a single customer regardless of their nightly backup switch. The API returns 400 if day has an invalid format or user names an administrator, and 404 if user names an account that does not exist.

The API returns 403 if the caller lacks administrator privileges and 409 if another server backup run is queued or running, including a scheduled run. It also returns 409 if server backups are off and identifies backups.enabled in the error. The worker runs one job at a time, so other jobs wait while the backup runs.

Request body

JSON ·BackupsRunRequest· 2 fields
daystring, matching ^\d{4}-\d{2}-\d{2}$
Name of the backup day folder in YYYY-MM-DD format. Defaults to today's date.
Username of the single account to back up, regardless of its nightly backup setting or status. As with Back up now in the web interface, UrbeStack writes an archive in the nightly format and a fresh server.json to the day folder, then skips retention and the remote copy. The operation returns 404 for an unknown username and 400 for an administrator's username.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X POST "$API/backups/run" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "day": "2026-09-09",
    "user": "alice"
  }'
Response · 202 Accepted
{
  "job": {
    "created_at": "2026-09-09T10:15:00Z",
    "created_by": 1,
    "created_by_name": "text",
    "dismissed_at": "text",
    "finished_at": "2026-09-09T10:15:04Z",
    "id": 1,
    "lane": "short",
    "log": "",
    "params": {},
    "progress": 100,
    "result": {},
    "started_at": "2026-09-09T10:15:01Z",
    "status": "queued",
    "type": "rebuild",
    "usual_seconds": 1
  }
}

Errors

14 errors, each a status and a sentence
400<name> is an administrator: administrators have no home, so no archive of theirs
400A day is named YYYY-MM-DD
400A new job is queued or running
400Invalid <what>:
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Job parameters must be an object
400Unknown job type
400Username '<value>' is reserved
401Authentication required
403Insufficient privileges
404No user named <user>
404User '<user>' not found
409A backup run is already <j.status> (job <j.id>); one at a time
409The server's backups are off (backups.enabled): turn them on on the Backups page, or with urbestack-setting-set --key backups.enabled --value true
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/post-backups-run/