Cancelling Backup Tasks

Use the stop-backup to cancel a backup task.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 
Request Packet Structure

A request XML packet cancelling a backup task includes the stop-backup operation node:

<packet>
<backup-manager>
   <stop-backup>
...
   </stop-backup>
</backup-manager>
</packet>

 

The stop-backup node is presented by type BackupStopInput (backup.xsd), and its graphical representation is as follows:

  • The task-id node is required. It specifies the task ID. Data type: integer.

Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.

 
Response Packet Structure

The stop-backup node of the output XML packet is presented by type BackupStopOutput (backup.xsd) and structured as follows:

  • The result node is required. It wraps the response retrieved from the server. Data type: resultType (common.xsd).
  • 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/1.6.8.0/agent_output.svg.

 
Samples
Canceling a backup task

The following packet cancels a backup task with ID 5.

<packet>
<backup-manager>
   <stop-backup>
      <task-id>5</task-id>
   </stop-backup>
</backup-manager>
</packet>

 

Response:

<packet version="1.6.7.0">
<backup-manager>
   <stop-backup>
<result>
      <status>ok</status>
</result>
   </stop-backup>
</backup-manager>
</packet>