Importing Backup to Storage

To add a backup to the local storage, perform the following two steps:

  1. Upload the backup to the temporary directory on the server using the upload operator. For details on the operator, refer to the section Supported Operations: Uploading Files to Server.
  2. Add the backup to the local storage using the import-file operator.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet moving a backup to the local storage includes the import-file operation node:

<packet>
<import-file>
   <put-backup>
...
   </put-backup>
</import-file>
</packet>

 

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

import-file

  • The webspace-id node is required. It specifies a webspace ID. Data type: integer.
  • The webspace-name node is required. It specifies a webspace 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 backup tasks. Data type: none.

    Note: You must specify one of the mentioned nodes in a request packet.

  • The tmp-filename node is required. It specifies full name of the backup retrieved from the response packet of the upload operation. Data type: string.
  • The ignore-sign node is optional. It specifies whether the backup can be imported to Plesk despite an invalid signature. Data type: boolean.

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

 

Response Packet Structure

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

put-backup-RePS

  • 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.

 

 

Samples

Moving the backup to the local storage of a customer

The request packet moving the backup to the local storage of the customer with ID 54 looks as follows:

<packet>
   <backup-manager>
      <import-file>
         <customer-id>54</customer-id>
         <tmp-filename>/usr/local/psa/tmp/MyBackup.bak</tmp-filename>
      </import-file>
   </backup-manager>
</packet>

 

Response:

<packet version="1.6.7.0">
<backup-manager>
      <import-file>
      <result>
            <status>ok</status>
      </result>
      </import-file>
</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.