WebsiteBackup

Start extracting a backup's files to a folder

Changed on

This function starts copying the website files of the domain parameter out of the named backup into a folder under the account's home directory, and returns an operationId return value immediately.

Note:

  • Poll the WebsiteBackup::operation_status function with the returned id for progress and the terminal state. The WebsiteBackup::list_operations function recovers the id if the client loses it.
  • The extraction is non-destructive. It never overwrites an existing file and never activates anything. It only places a copy of the archived document root under the named folder.
  • Because nothing live is touched, the per-account backup lock does not gate it and it may run alongside another operation.
  • Both the folder creation and the extraction run confined to the account's jail wherever the account is normally confined, so a jailed account cannot redirect the write outside its jail.
  • Pre-flight checks run synchronously and fail this call. The account must own the domain, the archive must exist, and the expanded archive must fit on disk.
  • The operation runs under a two-hour wall-clock cap.
  • This function requires the account's backup feature and is unavailable to demo (shared) accounts.
post/WebsiteBackup/extract_backup

Request

  • Base URL
    https://cpanel-server.tld:2083/execute
  • Auth
    HTTP basic

Request body application/x-www-form-urlencoded

domainstring required

The website whose files to extract from the backup.

Note: The account must own this domain.

idstring required

Identifier of the backup to extract from, as returned by the WebsiteBackup::list_backups function.

Note: The function does not check this parameter against the domain parameter. It locates the archive in the account's own backup directory by id alone, so an id from another of the account's sites extracts that site's files instead.

pathstring required

Destination folder for the extracted files, relative to the account's home directory.

Note:

  • The function creates the folder if it does not exist. It never overwrites existing files inside it.
  • The function strips a leading slash from this parameter and rejects any .. segment, but it does not resolve symlinks inside the home directory.
  • The WebsiteBackup::list_operations function reports this destination as its extractPath return value.

Example request

{
  "domain": "example.com",
  "id": "example.com-2026.08.18_12-53-12",
  "path": "backup-restore/example.com"
}

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "extract_backup",
  "module": "WebsiteBackup",
  "result": {
    "data": {
      "operationId": "2026-08-18T12:53:12Z.1"
    },
    "status": 1
  }
}

Changes