# Start extracting a backup's files to a folder

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.

Endpoint: POST /WebsiteBackup/extract_backup
Version: 11.138.0.10
Security: BasicAuth

## Request fields (application/x-www-form-urlencoded):

  - `domain` (string, required)
    The website whose files to extract from the backup.

Note:
The account must own this domain.
    Example: "example.com"

  - `id` (string, 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.
    Example: "example.com-2026.08.18_12-53-12"

  - `path` (string, 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: "backup-restore/example.com"

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "extract_backup"

  - `module` (string)
    The name of the module called.
    Example: "WebsiteBackup"

  - `result` (object)

  - `result.data` (object)
    The identifier of the background operation this call
started.

  - `result.data.operationId` (string)
    Identifier of the detached operation that performs
the work.

Note:
Pass it to the WebsiteBackup::operation_status
function to poll progress. The
WebsiteBackup::list_operations function recovers
it if the client loses it.
    Example: "2026-08-18T12:53:12Z.1"

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.status` (integer)
    * 1 - Success.
* 0 - Failed. Check the errors field for more
  details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings
describe non-critical failures or other problematic
conditions noted while running an API.


