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.

This value determines which parameters you can use with the function.


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

    We added this transport type in cPanel & WHM version 11.42.


  • Rsync

    We added this transport type in cPanel & WHM version 66.


  • GoogleDrive

    We added these transport types in cPanel & WHM version 66.


  • S3Compatible

    We added this transport type in cPanel & WHM version 74.


  • Backblaze

    We added this transport type in cPanel & WHM version 78.


Use any of these encrypted connections to transfer system backup files:

  • Amazon S3™
  • Backblaze
  • GoogleDrive
  • Rsync
  • S3 Compatible
  • SFTP
  • WebDAV with SSL enabled


Local

disabledBoolean

Required

Whether to disable the backup destination.

  • 1 — Disable the backup destination.
  • 0 — Enable the backup destination.
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