Use the get-remote-storage-settings operation to retrieve settings of a remote backups FTP storage.

Request Packet Structure

A request XML packet retrieving remote storage settings includes the get-remote-storage-settings operation node:

<packet>
<backup-manager>
   <get-remote-storage-settings>
...
   </get-remote-storage-settings>
</backup-manager>
</packet>

The get-remote-storage-settings node is presented by type BackupGetRemoteStorageSettingsInput (backup.xsd), and its graphical representation is as follows:

image 44426

  • The webspace-id node is optional. It specifies a subscription ID. Data type: integer.
  • The webspace-name node is optional. It specifies a subscription name. Data type: string.
  • The customer-id node is optional. It specifies a customer ID. Data type: integer.
  • The customer-login node is optional. It specifies a customer login. Data type: string.
  • The reseller-id node is optional. It specifies the reseller ID. Data type: integer.
  • The reseller-login node is optional. It specifies a reseller login. Data type: string.
  • The server node is optional. It instructs Plesk to create a server-level backup. Data type: none.
  • The protocol node is required. It specifies a protocol for which the settings are retrieved. Data type: string. Allowed values: ftp.

Note: If you do not define a target Plesk user, the operation will use packet sender identifier.

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-remote-storage-settings node of the output XML packet is presented by type BackupGetRemoteStorageSettingsOutput (backup.xsd) and structured as follows:

image 44439

  • 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 settings node is optional. It specifies settings of a remote storage if the operation succeeds. Data type: BackupRemoteStorage (backup.xsd). For details on the node, refer to the Remote Storage Settings section.

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 remote storage settings for a customer account

This request packet retrieves remote storage settings for the customer account with ID 17.

<packet>
<backup-manager>
   <get-remote-storage-settings>
      <customer-id>17</customer-id>
      <protocol>ftp</protocol>
   </get-remote-storage-settings>
</backup-manager>
</packet>

 Response:

<packet version="1.6.7.0">
<backup-manager>
   <get-remote-storage-settings>
      <result>
            <status>ok</status>
            <settings>
               <protocol>ftp</protocol>
               <host>ftp.example.com</host>
               <port>113</port>
               <directory>/backups/</protocol>
               <login>myftplogin</login>
               <password>myftppassword</password>
               <passive-mode>false</passive-mode>
            </settings>
      </result>
   </get-remote-storage-settings>
</backup-manager>
</packet>

If the settings haven’t been specified, the response from the server is as follows:

<packet version="1.6.7.0">
  <backup-manager>
    <get-remote-storage-settings>
      <result>
        <status>ok</status>
        <settings>
          <protocol>ftp</protocol>
          <host>false</host>
          <port>21</port>
          <directory>false</directory>
          <login>false</login>
          <password>false</password>
          <passive-mode>false</passive-mode>
        </settings>
      </result>
    </get-remote-storage-settings>
  </backup-manager>
</packet>

A negative response from the server can look as follows:

<packet version="1.6.7.0">
  <backup-manager>
    <get-remote-storage-settings>
      <result>
        <status>error</status>
        <errcode>1013</errcode>
        <errtext>client does not exist</errtext>
      </result>
    </get-remote-storage-settings>
  </backup-manager>
</packet>