Creating Server-level Backup Task

Use the backup-server operation to create a server-level backup task.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet creating a server-level backup task includes the backup-server operation node:

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

 

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

Note: If you do not want to split backup into several files, the split-size value should be set to 0.

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

 

Response Packet Structure

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

 

Samples

Creating a server-level backup task

The following request packet creates a server-level backup task.

<packet>
<backup-manager>
   <backup-server>
      <local/>
      <description>Standard weekly backup</description>
   </backup-server>
</backup-manager>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <backup-manager>
    <backup-server>
      <result>
        <status>ok</status>
        <task-id>27</task-id>
      </result>
    </backup-server>
  </backup-manager>
</packet>
 Creating a backup task to back up all mail accounts on the server

The following request packet creates a backup task which instructs Plesk to back up all mail accounts on the server.

<packet>
<backup-manager>
   <backup-server>
      <local/>
      <description>Standard weekly backup</description>
      <only-mail/>
   </backup-server>
</backup-manager>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <backup-manager>
    <backup-server>
      <result>
        <status>ok</status>
        <task-id>28</task-id>
      </result>
    </backup-server>
  </backup-manager>
</packet>