Retrieving Backup Task Status

Use the get-tasks-info operation to retrieve the status of backup tasks.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet retrieving the status of backup tasks includes the get-tasks-info operation node:

<packet>
<backup-manager>
   <get-tasks-info>
...
   </get-tasks-info>
</backup-manager>
</packet>

 

The get-tasks-info node is presented by type BackupGetBackupStatusInput (backup.xsd), and its graphical representation is as follows:

  • The webspace-id node is optional. It specifies a webspace ID. Data type: integer.
  • The webspace-name node is optional. It specifies a webspace name. Data type: string.
  • The customer-id node is optional. It specifies a customer ID. Data type: integer.
  • The customer-login node is optional. It specifies a customer login. Data type: string.
  • The reseller-id node is optional. It specifies the reseller ID. Data type: integer.
  • The reseller-login node is optional. It specifies the reseller login. Data type: string.
  • The server node is optional. It instructs Plesk to display server-level backup tasks. Data type: none.
  • The task-id node is optional. It specifies the task ID. Data type: integer.

Note: If you do not define a target Plesk user, the packet sender identifier will be used in the operation.

Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.

 

Response Packet Structure

The get-tasks-info node of the output XML packet is presented by type BackupGetBackupStatusOutput (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.
  • The task node contains details of a backup task. It has the following graphical presentation:

  • The customer-id node is required. It specifies a customer ID. Data type: integer.
  • The webspace-id node is required. It specifies a webspace ID. Data type: integer.
  • The reseller-id node is required. It specifies the reseller ID. Data type: integer.
  • The server node is required. It instructs Plesk to create a server-level backup. Data type: none.
  • The id node is required. It specifies the task ID. Data type: integer.
  • The status node is required. It specifies the execution status of the backup task. Data type: string. Allowed values: working | stopped | failed | finished.
  • The started node is required. It specifies timestamp when the backup task was started. Data type: string.
  • The prefix node is required. It specifies the backup name prefix. Data type: string.
  • The filename node is required. It specifies the full name of the backup. Data type: string.
  • The protocol node is optional. It specifies the used protocol. Data type: string. Allowed values: ftp | local.
 

Samples

Retrieving the status of backup tasks for a customer account

The following request packet retrieves the status of backup tasks for the customer account with ID 7:

<packet>
<backup-manager>
   <get-backup-status>
      <customer-id>7</customer-id>
   </get-backup-status>
</backup-manager>
</packet>

 

Response:

<packet version="1.6.7.0">
  <backup-manager>
    <get-tasks-info>
      <result>
        <status>ok</status>
        <task>
          <customer-id>7</customer-id>
          <id>5472</id>
          <status>working</status>
          <started>1224897686</started>
          <prefix/>
          <filename/>
          <protocol>local</protocol>
        </task>
      </result>
    </get-tasks-info>
  </backup-manager>
</packet>
Retrieving the status of a particular backup task

The following request packet retrieves the status of the backup task with ID 7:

<packet>
<backup-manager>
   <get-tasks-info>
      <task-id>7</task-id>
   </get-tasks-info>
</backup-manager>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <backup-manager>
    <get-tasks-info>
      <result>
        <status>ok</status>
        <task>
          <server/>
          <id>7</id>
          <status>finished</status>
          <started>1448947148</started>
          <prefix/>
          <filename>my_1512011119.tar</filename>
          <protocol>ftp</protocol>
        </task>
      </result>
    </get-tasks-info>
  </backup-manager>
</packet>
 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.