Use the download-file to download a backup from a local repository.
Note: Do not use other operations in the same packet with this operation, because structure of a download-file response packet varies depending on the result of the operation.
In case the file has been successfully downloaded, the response contains attached backup file. If any error occurs, the response contains XML packet with the error data.
Request Packet Structure
A request XML packet downloading a backup from the local storage includes the download-file operation node:
<packet> <backup-manager> <download-file> ... </download-file> </backup-manager> </packet>
The download-file node is presented by type BackupDownloadFileInput (
backup.xsd), and its graphical representation is as follows:
- The webspace-id node is required. It specifies a subscription ID. Data type: integer.
- The webspace-name node is required. It specifies a subscription name. Data type: string.
- The customer-id node is required. It specifies a customer ID. Data type: integer.
- The customer-login node is required. It specifies a customer login. Data type: string.
- The reseller-id node is required. It specifies a reseller ID. Data type: integer.
- The reseller-login node is required. It specifies a reseller login. Data type: string.
- The server node is required. It instructs Plesk to display server-level backup tasks. Data type: none.
Note: You should specify one of the mentioned nodes in a request packet.
- The filename node is optional. It specifies the name of a backup in the local storage. Data type: string.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/220.127.116.11/agent_input.svg.
Response Packet Structure
The download-file node of the output XML packet is presented by type BackupDownloadFileOutput (
backup.xsd) and structured as follows:
- The result node is required. It wraps the response retrieved from the server. Data type: resultType (
- The status node is required. It specifies the execution status of the operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Is returns the error code if the operation fails. Data type: integer.
- The errtext node is optional. It returns the error message if the operation fails. Data type: string.
Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/18.104.22.168/agent_output.svg.
MyBackup.bak from a local storage
The request packet downloading backup
MyBackup.bak from a local storage looks as follows:
<packet> <backup-manager> <download-file> <filename>MyBackup.bak</filename> </download-file> </backup-manager> </packet>
Content-Type: application/octet-stream Content-Disposition: attachment; filename=MyBackup.bak Pragma: no-cache <backup data>
Leave your feedback on this topic here
If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.