# GET /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 backup archive for a specific day

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

UrbeStack uses name and day to select the archive and reads only account.json as root. The archive field in the 200 response contains the customer name, when the backup was created, the domains, the databases with dumps in the archive, counts of mail accounts, SSH keys and FTP accounts, and whether the customer account still exists on this server.

The token requires the backups scope. UrbeStack returns 403 to callers without administrator privileges, 400 if day is missing or fails to match YYYY-MM-DD, and 404 if there is no archive for the specified name and day.

## 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` (query, Username, required)
- `day` (query, string, matching ^\d{4}-\d{2}-\d{2}$, required)

## 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/backups/archive?name=alice&day=2026-09-09" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "archive": {
    "database_users": 1,
    "databases": [
      "text"
    ],
    "domains": [
      "text"
    ],
    "exists": true,
    "exported_at": "text",
    "file": "urbestack-panel-20260909T101500Z.json.enc",
    "ftp_accounts": 1,
    "host": "text",
    "mail_accounts": 1,
    "name": "alice",
    "panel_version": "text",
    "scopes": [
      "everything"
    ],
    "size": 1,
    "ssh_keys": 1,
    "user": "alice"
  }
}
```

## 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: <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 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: 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: Insufficient privileges
- 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
