---
title: "Validate website backup disk quota"
method: GET
path: "/WebsiteBackup/disk_quota_check"
tags: ["WebsiteBackup"]
---

# Validate website backup disk quota

`GET /WebsiteBackup/disk_quota_check`

## Request

- Base URL: `https://cpanel-server.tld:2083/execute`
- URL: `https://cpanel-server.tld:2083/execute/WebsiteBackup/disk_quota_check`
- Auth: HTTP basic

This function estimates whether a backup of the `domain` parameter fits
in the account's remaining disk quota.

**Note:**

* The function compares an estimate of the document root's size against
  the quota the account has left and returns both figures alongside a
  single verdict, so a caller can warn before starting a backup that
  would fail.
* The estimate is advisory. The `WebsiteBackup::create_backup` function
  re-checks the quota itself and refuses if the backup no longer fits.
* This function is not cheap. It runs `du` over the whole document root,
  bounded only by a one-hour timeout. Call it when the backup dialog
  opens, not on a timer.
* This function requires the account's `backup` feature.

## Query parameters

- `domain` string, required

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer: The version of the API.
  - `func` string: The name of the method called.
  - `module` string: The name of the module called.
  - `result` object
    - `data` object: The quota verdict and the two figures it was derived from.
      - `availableBytes` integer: Bytes of quota the account has left. **Note:** This is `0` when the `unlimited` return value is `1`, which means “not applicable” rather than “no space”.
      - `estimatedBytes` integer: Estimated size in bytes of the website files to be archived. **Note:** * This covers website files only and does not size database dumps. * The value is best-effort. It is `0` when the function cannot measure the document root, because it is missing, unreadable, or `du` failed, and that also makes the `ok` return value come back `1`. * Treat `0` on a non-empty site as “not measured”, not as “nothing to back up”.
      - `ok` 1 | 0: Whether the estimated backup fits. * `1` - The backup is expected to fit, or the account is unlimited. * `0` - The estimate exceeds the remaining quota.
      - `unlimited` 1 | 0: Whether the account is unconstrained by a disk quota. * `1` - No quota applies, or quotas are not enabled on the server. The `availableBytes` return value is then `0` and the `ok` return value is always `1`. * `0` - A quota applies. See the `availableBytes` return value.
    - `errors` string[], nullable: List of errors if the API failed.
    - `messages` string[], nullable: List of messages generated by the API.
    - `metadata` object
    - `status` 0 | 1: * `1` - Success. * `0` - Failed. Check the `errors` field for more details.
    - `warnings` string[], nullable: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running an API.

## Changes

- **2026-09-12** `99adb57e7a5d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cpanel/apis/cpanel-uapi/changes/WebsiteBackup/disk_quota_check/get.md)

---

[API](https://skmtc.dev/cpanel/apis/cpanel-uapi.md) - [All operations](https://skmtc.dev/cpanel/apis/cpanel-uapi/llms.txt) - [OpenAPI document](https://skmtc.dev/cpanel/apis/cpanel-uapi/revisions/05239220da37?raw)
