Use the backup-webspace operation to create a webspace-level backup task.
A request XML packet creating a webspace-level backup task includes the backup-webspace operation node:
<packet>
<backup-manager>
<backup-webspace>
...
</backup-webspace>
</backup-manager>
</packet>
The backup-webspace node is presented by type BackupDomainInput (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 must be set to 0.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
The backup-webspace node of the output XML packet is presented by type BackupCommandOutput (backup.xsd
) and structured as follows:
common.xsd
).The following request packet creates a backup task for the webspace account with ID 3:
<packet>
<backup-manager>
<backup-webspace>
<webspace-id>3</webspace-id>
<local/>
<prefix>example-webspace</prefix>
<description>Standard weekly backup</description>
<split-size>0</split-size>
</backup-webspace>
</backup-manager>
</packet>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
<backup-manager>
<backup-webspace>
<result>
<status>ok</status>
<task-id>23</task-id>
</result>
</backup-webspace>
</backup-manager>
</packet>
The following request packet creates a backup task which instructs Plesk to back up mail accounts on example.com.
<packet>
<backup-manager>
<backup-webspace>
<webspace-name>example.com</webspace-name>
<remote>ftp</remote>
<description>Mail accounts backup</description>
<only-mail/>
</backup-webspace>
</backup-manager>
</packet>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
<backup-manager>
<backup-webspace>
<result>
<status>ok</status>
<task-id>22</task-id>
</result>
</backup-webspace>
</backup-manager>
</packet>