WebsiteBackup
Start a backup of a website's files and databases
Changed onThis function starts a backup of the document root of the domain parameter and returns an operationId return value immediately.
Note:
- A detached background process writes the archive, so a large backup never holds the request open.
- Pass the operationId return value to the WebsiteBackup::operation_status function to poll progress and read the terminal state. The WebsiteBackup::list_operations function recovers the id if the client loses it.
- Pre-flight checks run synchronously and fail this call. The account must own the domain, no other backup or restore may be running for the account, each named database must be a safe single path component, and the estimated archive must fit in the remaining disk quota.
- The function records anything that goes wrong after it backgrounds the work in the operation log, and reports it through the WebsiteBackup::operation_status function.
- The operation runs under a two-hour wall-clock cap. Exceeding that cap fails the operation.
- This function requires the account's backup feature and is unavailable to demo (shared) accounts.
post/WebsiteBackup/create_backup
Request
- Base URLhttps://cpanel-server.tld:2083/execute
- AuthHTTP basic
Request body application/x-www-form-urlencoded
Example request
{
"database": [
"user_wordpress",
"user_store"
],
"domain": "example.com",
"email": "user@example.com"
}Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "create_backup",
"module": "WebsiteBackup",
"result": {
"data": {
"operationId": "2026-08-18T12:53:12Z.1"
},
"status": 1
}
}Changes
- info
endpoint added
- info