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

/users/{name}/backups

First published 3 Oct 20260.1.0Unchanged since publication

Queue an on-demand backup for a customer

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

An administrator or the customer can request a backup. The response contains the queued backup-make job in job. The job creates one .tar.gz archive in backups/ at the top of the customer's home directory. The archive contains account.json with the customer's account export, files/ with the home directory contents, and database dumps at databases/<name>.sql. UrbeStack omits paths on the customer's backup exclusion list and includes earlier archives only if include_backups is true.

The API returns 400 if the target account is an administrator, 403 if the customer's package excludes on-demand backups, and 409 if an on-demand backup for the customer is already queued or running.

Before writing the archive, the job checks the projected free space on the filesystem. If the archive would bring free space below backups.min_free_percent, the job fails with 507 before writing any archive data.

As a command

Run as root on the server

Parameters

namepath ·UsernameRequired

Request body

JSON ·BackupRequest· 1 field
include_backupsboolean
Whether to include earlier archives from backups/. Defaults to false because including earlier archives can double the archive size with each run.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X POST "$API/users/alice/backups" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "include_backups": true
  }'
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

12 errors, each a status and a sentence
400A new job is queued or running
400An administrator has no home to back up
400Invalid <what>:
400Invalid boolean
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
403The package <p.name> does not include <SWITCH_WHAT>{<switch>}
404User '<user>' not found
409A backup of <name> is already <j.status> (job <j.id>); one at a time
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-users-name-backups/