Restore user account from backup

This function restores a user's cPanel account from a backup file.

SecurityBasicAuth
Request
query Parameters
restore_point
required
string

The date of the backup to use, in YYYY-MM-DD format.

Example: restore_point=2019-10-21T00:00:00.000Z
user
required
string

The cPanel account's username.

Example: user=username
destid
string
Default: "local"

The destination's identification string.

  • local — The local directory.
  • The destination ID string's value.
Example: destid=LmTZCUpqqLSPH8AO7pVtIeNK
give_ip
integer
Default: 0

Whether to assign the account a dedicated IP address.

  • 1 — Assign a dedicated IP address.
  • 0 — Use the shared IP address.
Enum: 0 1
Example: give_ip=1
mail_config
integer
Default: 0

Whether to restore the account's email configuration.

  • 1 — Restore.
  • 0 — Do not restore.
Enum: 0 1
Example: mail_config=1
mysql
integer
Default: 0

Whether to restore the account's MySQL® databases.

  • 1 — Restore.
  • 0 — Do not restore.
Enum: 0 1
Example: mysql=1
subdomains
integer
Default: 0

Whether to restore the account's subdomains.

  • 1 — Restore.
  • 0 — Do not restore.
Enum: 0 1
Example: subdomains=1
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/restore_queue_add_task
Request samples
whmapi1 --output=jsonpretty \
  restore_queue_add_task \
  user='username' \
  restore_point='2019-10-21T00:00:00.000Z'
Response samples
application/json
{
  • "data": {
    • "queue_id": "3b99QG5fp99tdL5"
    },
  • "metadata": {
    • "command": "restore_queue_add_task",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}