Use the set-remote-storage-settings operation to change settings of a remote backups FTP storage.

Request Packet Structure

A request XML packet changing remote storage settings includes the set-remote-storage-settings operation node:

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

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

image 44448

  • 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 the reseller login. Data type: string.
  • The server node is optional.. It instructs Plesk to create a server-level backup. Data type: none.
  • The settings node is required. It contains settings of a remote storage. Data type: BackupRemoteStorage (backup.xsd). For details on the node, refer to the Remote Storage Settings section.

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

image 44452

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

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

Changing remote storage settings for the customer account

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

<packet version="1.6.3.0">
<backup-manager>
   <set-remote-storage-settings>
      <customer-id>17</customer-id>
<settings>
      <protocol>ftp</protocol>
      <host>ftp.example.com</host>
      <port>112</port>
</settings>
   </set-remote-storage-settings>
</backup-manager>
</packet>

 Response:

<packet version="1.6.3.0">
<backup-manager>
   <set-remote-storage-settings>
      <result>
            <status>ok</status>
      </result>
   </set-remote-storage-settings>
</backup-manager>
</packet>

If the customer account was not found on the server, the response looks as follows:

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