Description

This function edits a backup destination's configuration settings.


Examples




https://hostname.example.com:2087/cpsess##########/json-api/backup_destination_set?api.version=1&type=name=WebDAV&id=0W1ei2rd3A4lI5sT6he7Be8st&name=WebDAVPlace&upload_system_backup=off&ssl=1&path=%2Fhome%2Fexample&port=21&host=hostname.example.com&username=username&timeout=30&password=12345luggage




https://hostname.example.com:2087/cpsess##########/xml-api/backup_destination_set?api.version=1&type=name=WebDAV&id=0W1ei2rd3A4lI5sT6he7Be8st&name=WebDAVPlace&upload_system_backup=off&ssl=1&path=%2Fhome%2Fexample&port=21&host=hostname.example.com&username=username&timeout=30&password=12345luggage




whmapi1 backup_destination_set type=name=WebDAV id=0W1ei2rd3A4lI5sT6he7Be8st name=WebDAVPlace upload_system_backup=off ssl=1 path=/home/example port=21 host=hostname.example.com username=username timeout=30 password=12345luggage



{
    "metadata": {
        "version": 1,
        "reason": "OK",
        "result": 1,
        "command": "backup_destination_set"
    }
}




<result>
   <metadata>
      <version>1</version>
      <reason>OK</reason>
      <result>1</result>
      <command>backup_destination_set</command>
   </metadata>
</result>



Parameters

ParameterTypeDescriptionPossible valuesExample
idstring

Required

The backup destination IDs.

A valid string.0W1ei2rd3A4lI5sT6he7Be8st
name
string

The backup destination's name.

If you do not set this parameter, the system retains the current setting.


A valid string.
destination
typestring

The type of transport.

  • The type value determines which additional parameters to use with the function.
  • If you do not set this parameter, the system retains the current setting.


  • FTP
  • SFTP
  • WebDAV
  • Local
  • Custom
  • We added this transport type in version 11.42:
    • AmazonS3
  • We added these transport types in version 66:
    • Rsync
    • GoogleDrive
  • We added this transport type in version 74:
    • S3Compatible

Only transfer system backup files over encrypted connections. The following destination types use encrypted connections:

  • Amazon S3™
  • Rsync
  • S3 Compatible
  • SFTP
  • WebDAV with SSL Enabled


Local

disabled Boolean

Whether to disable the backup destination.

If you do not set this parameter, the system retains the current setting.


  • 1 — Disabled.
  • 0 — Enabled.
0
disable_reasonstring

An error message that explains why the backup is disabled.

If you do not set this parameter, the system retains the current setting.


A valid string.Could not list files in destination: example
upload_system_backupstring

Whether to upload the system files.

If you do not set this parameter, the system retains the current setting.


  • on — Upload.
  • off — Do not upload.
off

Returns

This function only returns metadata.