9 functions, invoked through the cpanel_uapi tool.
scope cpanel:uapi
Call any function with cpanel_uapi(service_id, module="Backup", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.
This function creates a full backup to the remote server via File Transfer Protocol (FTP). The system creates a file in the backup-MM.DD.YYYY_HH-mm-ss.tar.gz filename format.
hoststringRequired
The remote server's hostname or IP address.
passwordstringRequired
The remote server account's password.
usernamestringRequired
The remote server account's username.
directorystringOptional
The directory on the remote server that will store the backup. Note: This value defaults to the remote server account's default login directory. Enter the directory relative to the FTP user's login directory. For example, enter /public_ftp not /home/username/public_ftp.
emailstringOptional
The email address to receive a confirmation email when the backup completes. Note: The system does not provide confirmation if you do not pass this parameter.
homedirstringOptional
How to manage the home directory in the backup. include — Include the home directory in the backup. skip — Omit the home directory from the backup.
portintegerOptional
The port number to use during the transfer.
variantstringOptional
Whether to use the active or passive FTP variant to connect to the remote server. For more information about FTP variants, read our How to Enable FTP Passive Mode documentation. active — The FTP server responds to the connection attempt and returns a connection request from a different port to the FTP client. passive — The FTP client initiates connection attempts.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
This function creates a full backup to the user's home directory. The system creates a file in the backup-MM.DD.YYYY_HH-mm-ss_username.tar.gz filename format.
emailstringOptional
The email address to receive a confirmation email when the backup process completes. Note: The system does not provide confirmation if you do not pass this parameter.
homedirstringOptional
How to manage the home directory in the backup. include — Include the home directory in the backup. skip — Omit the home directory from the backup.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
This function creates a full backup to a remote server with a private SSH key via the secure copy protocol (scp) command. The system creates a file in the backup-MM.DD.YYYY_HH-mm-ss_username.tar.gz filename format.
hoststringRequired
The remote server's hostname or IP address.
key_namestringRequired
The SSH key's name. Notes: To generate a private SSH key, use the UAPI SSL::generate_key function. To import an existing SSH key, use the cPanel API 2 SSH::importkey function.
key_passphrasestringRequired
The SSH key's password.
directorystringOptional
The directory on the remote server that will store the backup. Note: This parameter defaults to the remote server account's default login directory.
emailstringOptional
The email address to receive a confirmation email when the backup completes. Note: The system does not provide confirmation if you do not pass this parameter.
homedirstringOptional
How to manage the home directory in the backup. include — Include the home directory in the backup. skip — Omit the home directory from the backup.
portintegerOptional
The port to use during the transfer.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
This function creates a full backup to a remote server via the secure copy protocol (scp) command with a password. The system creates a file in the backup-MM.DD.YYYY_HH-mm-ss.tar.gz filename format.
hoststringRequired
The remote server's hostname or IP address.
passwordstringRequired
The remote server account's password.
usernamestringRequired
The remote server account's username.
directorystringOptional
The directory on the remote server that will store the backup. Note: This parameter defaults to the remote server account's default login directory.
emailstringOptional
The email address to receive a confirmation email when the backup completes. Note: The system does not provide confirmation if you do not pass this parameter.
homedirstringOptional
How to manage the home directory in the backup. include — Include the home directory in the backup. skip — Omit the home directory from the backup.
portintegerOptional
The port to use during the transfer.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
When the MySQL Client role is disabled, the system also disables this function.
Note:
You must pass either the fileorbackup parameter.
No parameters.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
log_idstring
The log file's restoration identification (ID). The system uses the backup restoration's date to create this ID. The ID is in ISO-8601 Date Time format with the log's revision number appended.
log_pathstring
The filepath to the backup restoration's log file.
messagesarray<string>
An array of statements about the database's restoration.
This function restores an account's email filters.
Important:
When the Receive Mail role is disabled, the system also disables this function.
Note:
You must use the backup parameter when you call this function in one of the following formats:
As part of a multipart/form-data request body to upload and restore a backup file to the server.
As a query parameter to restore an existing file on the server.
No parameters.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
log_idstring
The log file's restoration identification (ID). The system uses the backup restoration's date to create this ID. The ID is in ISO-8601 Date Time format with the log's revision number appended.
log_pathstring
The filepath to the backup restoration's log file.
messagesarray<string>
An array of statements about the database's restoration.
This function restores an account's email forwarders.
Important:
When the Receive Mail role is disabled, the system also disables this function.
Note:
You must use the backup parameter when you call this function in one of the following formats:
As part of a multipart/form-data request body to upload and restore a backup file to the server. For more information about this structure, read Mozilla's POST Method documentation.
As a query parameter to restore an existing file on the server.
No parameters.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
log_idstring
The log file's restoration identification (ID). The system uses the backup restoration's date to create this ID. The ID is in ISO-8601 Date Time format with the log's revision number appended.
log_pathstring
The filepath to the backup restoration's log file.
messagesarray<string>
An array of statements about the database's restoration.
When the File Storage role is disabled, the system also disables this function.
Note:
You must use the backup parameter when you call this function in one of the following formats:
As part of a multipart/form-data request body to upload and restore a backup file to the server. For more information about this structure, read Mozilla's POST Method documentation.
As a query parameter to restore an existing file on the server.
No parameters.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
log_idstring
The log file's restoration identification (ID). The system uses the backup restoration's date to create this ID. The ID is in ISO-8601 Date Time format with the log's revision number appended.
log_pathstring
The filepath to the backup restoration's log file.
messagesarray<string>
An array of statements about the database's restoration.