/users/{name}/backups/restore
0.1.0Unchanged since publicationQueue a customer restore from an on-demand or nightly backup archive
backupsallUse own for an on-demand archive or day for a nightly archive. A nonempty own takes precedence over day. The archive must be an UrbeStack customer archive with a matching schema version. Choose one scope. The default, everything, restores account records, the home directory including mail, and every database in the archive. Use files for the home directory excluding mail, mail for mailbox contents, database for one database dump, or records for account records. With database scope, the named database must have a dump in the archive.
The API returns 400 if the target account is an administrator, neither archive selector is supplied, the selected value has an invalid format, own ends in .part, scope is invalid, or database is missing or invalid for database scope. The API returns 409 if a restore or on-demand backup for the customer is already queued or running. For customers and resellers, the API returns 403 if the package excludes on-demand backups or if day is selected while either backups.enabled or backups.nights_for_customers is off. Only an administrator can restore a suspended account.
For a customer or reseller, UrbeStack treats the archive as untrusted and restores into the account specified by name, regardless of the account named in the archive. An archive selected by own must be a regular file owned by the customer. Symbolic links are refused. UrbeStack extracts files and mail with tar running as the customer and loads dumps as the customer's phpMyAdmin user, rewriting every DEFINER to that user so the restore can access only the customer's databases.
Customer restores validate records using the same rules as manual changes. For existing domains, they can restore DNS records, mail accounts and their passwords, forwarders, filters, autoresponders, mailing lists, customer-configurable mail settings and FTP accounts. They can also restore databases with their users and grants, SSH keys, backup exclusions and cron jobs. The job result identifies omissions involving domains, domain settings, administrator-only settings and the customer account itself.
Administrator restores run as root and warn if the archive is owned by another user. An administrator restore using own requires the archive to name the specified customer. It recreates missing databases, database users and grants from the archive, and dumps replace the tables covered by their DROP TABLE statements. Restored files and records are applied over the existing account, replacing matching entries.
The response contains the queued restore job in job. The job reports progress, stops at the first failure and lists the steps completed before it.
As a command
Run as root on the serverParameters
namepath ·UsernameRequiredRequest body
JSON· 4 fieldsdatabasestringdaystring, matching ^\d{4}-\d{2}-\d{2}$ownstringscopestring, one of everything, files, mail, database, recordsExample
See the API overview for how to set $API and $TOKEN.curl -sS -X POST "$API/users/alice/backups/restore" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"database": "alice_shop",
"day": "2026-09-09",
"own": "text",
"scope": "everything"
}'202 Accepted{
"job": {}
}Errors
19 errors, each a status and a sentence400<f> is still being written400A database name is letters, digits and underscores400A day is named YYYY-MM-DD400A new job is queued or running400An administrator has no home to restore into400An archive is named <user>-<date>-<time>.tar.gz400Invalid <what>: 400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter400Job parameters must be an object400Name the archive: own, one of the customer's, or day, a night of the server400The database scope names the database400The scope is one of 400Unknown job type400Username '<value>' is reserved401Authentication required403Nightly backups aren't available to customers on this server. Restore from one of the account's on-demand backups instead.403The package <p.name> does not include <SWITCH_WHAT>{<switch>}404User '<user>' not found409A restore or a backup of <name> is already <j.status> (job <j.id>); one at a timeurbestack.com/docs/api/post-users-name-backups-restore/