# GET /users/{name}/backups/archive

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the backups group.

Inspect a customer's on-demand or nightly backup archive

- Who may call it: administrator, reseller, customer
- Token scope, any of: backups, read, all
- Answers: 200 OK

UrbeStack reads only account.json and returns the account named in it and a description of the archive's contents in archive. The archive must be an UrbeStack customer archive with a matching schema version.

Use own for an on-demand archive or day for a nightly archive. A nonempty own takes precedence over day. The API returns 400 if neither is supplied, the selected value has an invalid format, own ends in .part, or the target account is an administrator.

For a customer or reseller, UrbeStack reads account.json with tar running as the customer. For own, UrbeStack opens the archive as root only if it is a regular file owned by the customer. Symbolic links are refused. For an administrator, UrbeStack inspects the archive as root.

For customers and resellers, the API returns 403 if the customer's package excludes on-demand backups, or if day selects a nightly archive while either backups.enabled or backups.nights_for_customers is off.

## As a command

- [urbestack-restore](https://urbestack.com/docs/commands/urbestack-restore.md): Restores a customer from an UrbeStack archive or restores a whole backup day folder onto a fresh installation.

## Parameters

- `name` (path, Username, required)
- `own` (query, string): Filename of a completed archive in the customer's backups/ directory. It starts with an ASCII letter or digit, followed by up to 200 ASCII letters, digits, dots, underscores or hyphens, and ends in .tar.gz.
- `day` (query, string, matching ^\d{4}-\d{2}-\d{2}$): Date of the server's nightly backup in YYYY-MM-DD format.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/users/alice/backups/archive?own=text&day=2026-09-09" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "archive": {}
}
```

## Errors

- 400: '<zone>' is not a zone this machine knows: timedatectl list-timezones names them
- 400: --as-customer restores from --day or --own, never a file
- 400: --file and --day/--own exclude each other
- 400: --root-owned goes with --file
- 400: --server takes no other option but --trust-files
- 400: <_> is set per domain, on the PHP page's Domains tab, never as a server default
- 400: <dir> is not a day folder of the panel's: no 
- 400: <f> is still being written
- 400: <file> is not a customer's archive: its kind is '
- 400: <file> is not one of the panel's archives: its account.json is not readable
- 400: <file> is not one of the panel's archives: no account.json inside
- 400: <file> names no customer
- 400: <file> was made by a panel of another schema version (
- 400: <info.file> belongs to 
- 400: <info.file> is a symbolic link: an archive a plugin hands the panel is a regular file of root's own
- 400: <name> has an owner: move them to the administrator before changing their role
- 400: <name> is an administrator: administrators have no home, so nothing to back up
- 400: <name> is an administrator: administrators have no system account, so no shell
- 400: <path> is larger than <MAX_BYTES> bytes
- 400: <src.label> is not a customer's archive
- 400: <src.label> is not one of the panel's archives: its account.json is not readable
- 400: <src.label> is not one of the panel's archives: no account.json inside
- 400: <src.label> was made by a panel of another schema version
- 400: <user.name> is an administrator: administrators have no home
- 400: <value> is kept for the domain's own use; pick another name, like mcp
- 400: A day is named YYYY-MM-DD
- 400: A deny may not cover loopback
- 400: A name is letters, digits and hyphens, up to 32, like mcp
- 400: A new job is queued or running
- 400: A subdomain belongs to the same user as its parent
- 400: A subdomain cannot have a subdomain as its parent
- 400: An administrator has no home to restore into
- 400: An administrator has no shell: only a customer has a system account
- 400: An archive is named <user>-<date>-<time>.tar.gz
- 400: An archive of the customer's own is named with the customer
- 400: Backup exclude '
- 400: Bad entry for <path>
- 400: Cannot demote or suspend the last active administrator
- 400: Crontab: user '
- 400: Document root must be inside <home>
- 400: Domain <name>: <user.name> is not a customer account
- 400: Domain <name>: a <k> must be a number
- 400: Domain <name>: invalid status
- 400: Domain <name>: user <user> not found
- 400: Domain name required
- 400: Domain name too long
- 400: Domains belong to users with role 'user'
- 400: FTP account '<name>': user '<user>' not found
- 400: Invalid IPv4 address
- 400: Invalid IPv6 address
- 400: Invalid PHP version, expected e.g. 8.2
- 400: Invalid boolean
- 400: Invalid document root
- 400: Invalid domain name
- 400: Invalid email address
- 400: Invalid id
- 400: Invalid mail address
- 400: Invalid mail address: local part over 64 characters
- 400: Invalid mail address: no local part
- 400: Invalid mail address: the local part may hold letters, digits, dots, _ + and -
- 400: Invalid package name in export
- 400: Invalid package name: letters, digits, spaces, dots, underscores and dashes, up to 64, starting with a letter or digit
- 400: Invalid password hash
- 400: Invalid password: 8 to 128 printable characters
- 400: Invalid port
- 400: Invalid role: admin, user or reseller
- 400: Invalid setting key
- 400: Invalid status
- 400: Invalid system password hash
- 400: Invalid template name
- 400: Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
- 400: Job parameters must be an object
- 400: Name the archive: --name USER with --day DAY or --own FILE, or --file PATH
- 400: Name the archive: own, one of the customer's, or day, a night of the server
- 400: Nothing to change
- 400: One scope at a time: --files, --mail, --database NAME or --records, or none for everything
- 400: Only a customer has an owner: an administrator or a reseller is the administrator's own
- 400: PHP <version> cannot be the default: it is hidden from new choices on this server
- 400: PHP <version> cannot be the default: it is not installed on this server
- 400: PHP settings must be an object of setting: value
- 400: Package <name> belongs to the reseller <pkg.owner>, who is not on this server: import the accounts too, or make the reseller first
- 400: Package <name>: unknown limit
- 400: Protected folder '<f.path>': user '<f.user>' not found
- 400: SSH key '<k.label>': user '<k.user>' not found
- 400: Subdomain '<name>' does not sit under '<parent.name>'
- 400: The archive holds no database named '<dbname>'
- 400: The folder is an absolute path
- 400: The profile carries rule <id> twice
- 400: The scope is one of 
- 400: The second factor can only be turned off here; a user enrols from their own page
- 400: The smarthost password in the export is not printable
- 400: This export is encrypted; a passphrase is required
- 400: Unknown PHP version '<version>'
- 400: Unknown job type
- 400: Unknown setting '<key>'
- 400: Unknown ssl key '<k>'
- 400: Username '<value>' is reserved
- 400: jobs.keep_days (<keep>) may not be smaller than jobs.show_days (<show>): a job cannot be shown longer than it is kept; 0 keeps them for good
- 400: ssl must be an object
- 401: Authentication required
- 403: Nightly backups aren't available to customers on this server. Restore from one of the account's on-demand backups instead.
- 403: The package <p.name> does not include <SWITCH_WHAT>{<switch>}
- 404: File not found: <file>
- 404: No archive named 
- 404: No folder at <dir>
- 404: Package '<name>' not found
- 404: Parent domain '<parent>' not found
- 404: Setting '<key>' not found
- 404: User '<at.name>' not found
- 404: User '<name>' not found
- 404: User '<o.name>' not found
- 404: User '<owner>' not found
- 409: '<name>' is already an alias here
- 409: <key> cannot take that value: <SECOND>{<k>}{on} <sp> (<k>). <SECOND>{<k>}{move}, or choose another
- 409: <key> cannot take that value: the panel listens on port <port> (panel.port). Move the panel first, or choose another
- 409: <name> is on the package <p.name> of the reseller <p.owner>: change the package before the move
- 409: <name> owns <owned> 
- 409: <s.subject> cannot take port <port>: 
- 409: <s.subject> cannot take port <port>: <why>
- 409: <s.subject> cannot take port <port>: it is the panel's port (panel.port)
- 409: <user.name> is suspended: an administrator restores a suspended account
- 409: <who> and its bandwidth for the month is used up: 
- 409: <who> and its disk is used up: 
- 409: <why>; pick another name
- 409: A change is already armed for revert (
- 409: A system account named '<name>' already exists
- 409: BotMail is being turned on for <name> already
- 409: Domain '<name>' already exists
- 409: Sharing is required with this license.
- 409: The archive <info.file> is ${name}'s, not 
- 409: The package <p.name> allows <limit> 
- 409: The panel cannot take port <port>: 
- 409: The panel cannot take port <port>: <why>
- 409: These are the nameservers of a distribution network with several nodes, and every node lists the same ones. To remove a nameserver or move it to another node, use the actions beside its name on DNS zones › Nameservers & addresses, or urbestack-dns-nameserver
- 409: This archive in the backups folder of <o.name> is ${name}'s: restore it at a shell with urbestack-restore --file, which restores it as <name>
- 409: This folder needs what this server does not have yet. Install it first, in this order:\n
- 409: User '<name>' already exists
