Child pages
  • WHM API 1 Functions - restore_queue_add_task
Skip to end of metadata
Go to start of metadata

Description

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

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/restore_queue_add_task?api.version=1&user=username&restore_point=2015-10-21&give_ip=0&mysql=1&subdomains=1&mail_config=1&destid=local
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/restore_queue_add_task?api.version=1&user=username&restore_point=2015-10-21&give_ip=0&mysql=1&subdomains=1&mail_config=1&destid=local
 Command Line
whmapi1 restore_queue_add_task user=username restore_point=2015-10-21 give_ip=0 mysql=1 subdomains=1 mail_config=1 destid=local


Notes:

  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
    "data": {
        "queue_id": "3b99QG5fp99tdL5"
    },
    "metadata": {
        "version": 1,
        "reason": "OK",
        "result": "1",
        "command": "restore_queue_add_task"
    }
}
 Output (XML)
<result>
   <data>
      <queue_id/>
   </data>
   <metadata>
      <version>1</version>
      <reason>OK</reason>
      <result>1</result>
      <command>restore_queue_add_task</command>
   </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.


Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The cPanel account's username.

A valid cPanel username.username
restore_pointstring

Required

The date of the backup to use.

A backup creation date, where:

  • YYYY represents the year.
  • MM represents the month.
  • DD represents the date.
2015-10-21
give_ipBoolean

Whether to assign the account a dedicated IP address.

This parameter defaults to 0.

  • 1 — Assign a dedicated IP address.
  • 0 — Use the shared IP address.
1
mysqlBoolean

Whether to restore the account's MySQL® databases.

This parameter defaults to 0 .

  • 1 — Restore.
  • 0 — Do not restore.
1
subdomainsBoolean

Whether to restore the account's subdomains.

This parameter defaults to 0 .

  • 1 — Restore.
  • 0 — Do not restore.
1
mail_configBoolean

Whether to restore the account's email configuration.

This parameter defaults to 0 .

  • 1 — Restore.
  • 0 — Do not restore.
1
destidstring

The destination's identification string.

Note:

We added this parameter in cPanel & WHM version 80.

This parameter defaults to local.

  • local — The local directory.
  • The destination ID string's value.
LmTZCUpqqLSPH8AO7pVtIeNK

Returns

ReturnTypeDescriptionPossible valuesExample
queue_idstringThe process's internal task queue ID.A valid ID string.
3b99QG5fp99tdL5