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:

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:

 

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>