Description

This function adds a backup destination.


Examples




https://hostname.example.com:2087/cpsess##########/json-api/json-api/backup_destination_add?api.version=1&name=destination%20name&type=Local&path=%2Fmylocaldir&mount=0&no_mount_fail=0




https://hostname.example.com:2087/cpsess##########/xml-api/backup_destination_add?api.version=1&name=destination%20name&type=Local&path=%2Fmylocaldir&mount=0&no_mount_fail=0




whmapi1 backup_destination_add name=destination_name type=Local path=%2Fmylocaldir mount=0 no_mount_fail=0



{
    "data": {
        "id": "11111111"
    },
    "metadata": {
        "version": 1,
        "reason": "OK",
        "result": 1,
        "command": "backup_destination_add"
    }
}




<result>
   <data>
      <id>111111</id>
   </data>
   <metadata>
      <version>1</version>
      <reason>OK</reason>
      <result>1</result>
      <command>backup_destination_add</command>
   </metadata>
</result>



Parameters

ParameterTypeDescriptionPossible valuesExample
name
string

Required

The backup destination's name.

A valid string.
destination_name
typestring

Required

The type of transport.

The type value determines which additional parameters to use with the function.


  • Custom
  • FTP
  • Local
  • SFTP
  • WebDAV
  • AmazonS3

    We added this transport type in version 11.42.


  • Rsync
  • GoogleDrive

    We added these transport types in version 66.


  • S3Compatible


    We added this transport type in version 74.


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

disabledBoolean

Required

Whether to disable the backup destination.

  • 1 — Disabled.
  • 0 — Enabled.
0
upload_system_backupstring

Whether to upload system backups.

This parameter defaults to off.

  • on — Enabled.
  • off — Disabled.
on

Returns

ReturnTypeDescriptionPossible valuesExample
idstring

The backup destination's ID.

A valid string.11111111