Retrieving a List of Local Backups¶
Use the get-local-backup-list to retrieve the list of backups stored in the Plesk’s local storage.
Request Packet Structure¶
A request XML packet retrieving a list of backups stored in the local storage includes the get-local-backup-list operation node:
<packet>
<backup-manager>
<get-local-backup-list>
...
</get-local-backup-list>
</backup-manager>
</packet>
The get-local-backup-list node is presented by type
BackupGetLocalBackupListInput (backup.xsd
), and its graphical
representation is as follows:
- The webspace-id node is required. It specifies a subscription ID. Data type: integer.
- The webspace-name node is required. It specifies a subscription name. Data type: string.
- The customer-id node is required. It specifies a customer ID. Data type: integer.
- The customer-login node is required. It specifies a customer login. Data type: string.
- The reseller-id node is required. It specifies a reseller ID. Data type: integer.
- The reseller-login node is required. It specifies a reseller login. Data type: string.
- The server node is required. It instructs Plesk to display server-level backups. Data type: string.
Note
You must specify one of the mentioned nodes in a request packet.
Note
When creating request packets, put nodes and elements in the order they follow in the packet structure.
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 get-backup-status node of the output XML packet is presented by
type BackupGetLocalBackupListOutput (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 backup node is optional. If the operation succeeds, it contains the list of backups stored in the local repository of the specified user. Data type: BackupType (
backup.xsd
).It can be graphically represented in the following way:
- The file node is required. It contains backup details. Data
type: BackupFile (
backup.xsd
). - The name node is required. It holds the name of a file included in the backup. Data type: string.
- The creation-date node is required. It holds the creation date of the file included in the backup. Data type: timestamp.
- The description node is required. It holds the description of the file included in the backup. Data type: string.
- The size node is required. It holds the size of the file
included in the backup. Data type: size (
common.xsd
). - The not-backup node is optional. It is present in a response packet in case of backup failure. Data type: none.
- The file node is required. It contains backup details. Data
type: BackupFile (
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¶
Retrieving the list of local backups for a customer account¶
The following request packet retrieves the list of local backups for customer account MyAccount:
<packet>
<backup-manager>
<get-local-backup-list>
<customer-login>MyAccount</customer-login>
</get-local-backup-list>
</backup-manager>
</packet>
Response:
<packet version="1.6.7.0">
<backup-manager>
<get-local-backup-list>
<result>
<status>ok</status>
<backup>
<file>
<name>12-11-2003-mycustomer_3_8.bak</name>
<creation-date>1179482633</creation-date>
<description/>
<size>0</size>
<not-backup/>
</file>
</backup>
<backup>
<file>
<name>priest_2007.05.18_17.12</name>
<creation-date>1179483198</creation-date>
<description>sdf backup.
Creation date: May 18, 2007 05:12 PM</description>
<size>128732</size>
</file>
</backup>
</result>
</get-local-backup-list>
</backup-manager>
</packet>
I