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

/move/copy

First published 3 Oct 20260.1.0Last changed 25 Nov 20260.2.332 changes to view
Latest change (release 0.2.33): The operation rejects names this server cannot assign before copying.

Start a job to copy accounts while the source keeps serving them

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

Returns 202 with the job in job. This is the first phase of a move and can be repeated before cutover. Copying a reseller also copies their customers, with the reseller copied first. The job checks that account names and domains are available on the destination and that the required software is installed. If software is missing, the job fails and lists the installation commands in the order to run them.

The job lowers the TTLs of the account's zones on the source to five minutes. It imports account records and secrets, installs the existing certificates, and stages the account as suspended on the destination. Cron jobs and mail handling stay on the source until cutover. The job copies the home directory, including sites and mail, using rsync over SSH. It dumps each database on the source and loads it on the destination. Later copies transfer new and changed files and remove data deleted from the source since the previous copy. A failed copy can affect only zone TTLs on the source.

For zones whose nameservers are hosted elsewhere, the job result lists the DNS records to update manually at cutover.

Set profile to true to import the source server's settings and packages before copying accounts. With profile alone, the job imports the profile without copying accounts. Use GET /move/profile to preview the changes and identify settings marked names_old_server. Omit settings to import all settings, or supply an array of setting keys to import just those settings. An empty array selects zero settings. Packages are imported in full regardless of the setting selection.

The job leaves hooks, overrides, custom includes, and registered files for root to review. The result lists them in profile.left_for_root and provides the rsync command to fetch them into /root/urbestack-review. After reviewing the files, use urbestack-move-copy --profile --trust-files to import them.

Supply a nonempty users array of source account names, set all to true, or set profile to true. Use as to map selected source account names to their destination names. Returns 400 if none of these selections is made, users and all are combined, users is not an array, as is not an object or names an account outside users, or settings is not an array or is supplied without profile.

Requires a token with the users scope. Returns 403 if the caller lacks administrator privileges.

Request body

JSON ·MoveCopyRequest· 5 fields
allboolean
Whether to copy every source account that has yet to move. Use this in place of users.
asobject of Username
The as field maps source usernames in users to destination usernames when the source username is taken, reserved or invalid on the destination. After the first copy under the chosen username, UrbeStack automatically reuses it for later copies and cutover and refuses a different username.
profileboolean
Whether to copy the source server's settings and packages before copying accounts, or by themselves when no accounts are selected. UrbeStack leaves hooks, overrides, custom includes and registered files in the profile for root to review and apply. The job result lists those items, the rsync command to fetch them and the shell command to apply them.
settingsarray of string, matching ^[a-z][a-z0-9_]{0,31}(\.[a-z][a-z0-9_]{0,31}){0,3}$
Keys of the settings to copy when profile is enabled. An empty list copies no settings and omitting settings copies them all. UrbeStack copies all packages regardless of this selection.
usersarray of SourceUsername
Source server usernames of the accounts to copy. Selecting a reseller also copies their customers.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X POST "$API/move/copy" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "all": true,
    "as": {},
    "profile": true,
    "settings": [
      "text"
    ],
    "users": [
      "text"
    ]
  }'
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

19 errors, each a status and a sentence
400A new job is queued or running
400Invalid <what>:
400Invalid setting key
400Invalid source username: 1 to 32 lowercase letters, digits, underscores or hyphens, starting with a letter
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Job parameters must be an object
400Name the accounts in users, or all; or profile alone for the source server's settings and packages
400Unknown job type
400Username '<value>' is reserved
400as goes with users
400as is an object: the name on the source server, and the name the account takes here
400as names <o>, which is not among users
400settings goes with profile
400settings is a list of setting keys
400users and all exclude each other
400users is a list of account names
401Authentication required
403Insufficient privileges
404User '<user>' not found

Change log

2 changes since publication, newest first
0.2.3325 Nov 2026
The operation rejects names this server cannot assign before copying.The operation reports all affected accounts without a replacement name in as before doing any work on the source server. Previously, the copy stopped when it reached the first such account.
0.2.3325 Nov 2026
Account names use the source server’s names.Each name in users is the account’s name on the source server and must be 1 to 32 characters long, start with a letter and contain only lowercase letters, digits, underscores or hyphens. If this server cannot assign that name, provide a replacement name in as.From the named type MoveCopyRequest→
0.1.03 Oct 2026
First published.
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry last changed in release 0.2.33 on 25 Nov 2026.
urbestack.com/docs/api/post-move-copy/