Child pages
  • WHM API 1 Functions - backup_destination_add

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

This function adds a backup destination.


Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagexml
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



Expand
titleXML API


Code Block
languagexml
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



Expand
titleCommand Line


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

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


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



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<result>
   <data>
      <id>111111</id>
   </data>
   <metadata>
      <version>1</version>
      <reason>OK</reason>
      <result>1</result>
      <command>backup_destination_add</command>
   </metadata>
</result>


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


Parameters

ParameterTypeDescriptionPossible valuesExample
name
string

Required

The backup destination's name.

A valid string.
destination_name
typestring

Required

The type of transport.

Note
titleNote:

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


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

    Note
    titleNote:

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


  • Rsync

    Note
    titleNote:

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


  • GoogleDrive

    Note
    titleNote:

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


  • S3Compatible

    Note
    titleNote:

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


  • Backblaze

    Note
    titleNote:

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


Warning
titleWarning:

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

Include Page
LIB:_BackupDestTypeParameters
LIB:_BackupDestTypeParameters

Returns

ReturnTypeDescriptionPossible valuesExample
idstring

The backup destination's ID.

A valid string.11111111