latestOpenAPI 3.0.2cPanel License2026-08-106251554.3 MB

3da41671c02c

Backups
Backup Destination

Add a backup destination

This function adds a backup destination.

get/backup_destination_add

Query parameters

application_keystring required
Example:A123b45CD678e9

The application key's name.

Note:

This parameter is only valid for the Backblaze backup type.

application_key_idstring required
Example:12a345B678c9

The application key ID that authenticates the Backblaze B2 account.

Note:

This parameter is only valid for the Backblaze backup type.

authtype'password' | 'key' required
Example:password

The authorization type.

  • password
  • key

Note:

This parameter is only valid for the following backup types:

  • SFTP
  • Rsync
aws_access_key_idstring required
Example:AKIAYLWMPOZZJCERC28Q

The Amazon S3™ Access Key ID.

Note:

This parameter is only valid for the following backup types:

  • AmazonS3
  • S3Compatible
bucketstring required
Example:ChockFullOfNuts

The Amazon S3™ bucket.

Note:

This parameter is only valid for the following backup types:

  • AmazonS3
  • S3Compatible
bucket_idstring required
Example:a12b34cd5678e9f

The bucket's ID string.

Note:

This parameter is only valid for the Backblaze backup type.

bucket_namestring required
Example:ChockFullOfNuts

The bucket's name.

Note:

This parameter is only valid for the Backblaze backup type.

client_idstring required
Example:aBcdeFgHIjK123

The Google Drive client ID.

Note:

This parameter is only valid for the GoogleDrive backup type.

client_secretstring required
Example:aBcde123FgHIjK456

The Google Drive client secret.

Note:

This parameter is only valid for the GoogleDrive backup type.

disabled0 | 1 required

Whether to disable the backup destination.

  • 1 — Disable the backup destination.
  • 0 — Enable the backup destination.
hoststring hostname required
Example:backups.example.com

The remote server's hostname.

Note:

This parameter is only valid for the following backup types:

  • Custom
  • FTP
  • SFTP
  • Rsync
  • WebDAV
  • S3Compatible
namestring required
Example:destination_name

The backup destination's name.

passwordstring required
Example:123456luggage

The remote server account's password or secret access key.

Note:

This parameter is only valid for the following backup types:

  • AmazonS3
  • Custom
  • FTP
  • SFTP
  • Rsync
  • WebDAV
  • S3Compatible
scriptstring required
Example:/home/backups/beammeupscotty.pl

The absolute file path to the user-supplied transport solution script.

Note:

This parameter is only valid for the Custom backup type.

type'Custom' | 'FTP' | 'Local' | 'SFTP' | 'WebDAV' | 'AmazonS3' | 'Rsync' | 'GoogleDrive' | 'S3Compatible' | 'Backblaze' required
Example:Local

The type of backup destination.

  • Custom
  • FTP
  • Local
  • SFTP
  • WebDAV
  • AmazonS3
  • Rsync
  • GoogleDrive
  • S3Compatible
  • Backblaze

Note:

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

Warning:

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

  • Amazon S3™
  • Backblaze
  • GoogleDrive
  • Rsync
  • S3 Compatible
  • SFTP
  • WebDAV with SSL enabled
usernamestring username required
Example:username

The remote server account's username.

Note:

This parameter is only valid for the following backup types:

  • Custom
  • FTP
  • SFTP
  • Rsync
  • WebDAV
folderstring
Example:subfolder

The path to the backups directory on the remote server.

Note:

This parameter is only valid for the following backup types:

  • AmazonS3
  • GoogleDrive
  • S3Compatible
mount0 | 1
Example:1

Whether the path is mounted.

  • 1 — The path is mounted.
  • 0 — The path is not mounted.

Note:

This parameter is only valid for the Local backup type.

no_mount_fail0 | 1
Example:1

Whether to fail the backup attempt if the mount fails.

  • 1 — Fail the backup attempt.
  • 0 — Do not fail the backup attempt.

Note:

This parameter is only valid for the Local backup type.

only_used_for_logs0 | 1
Example:1

Whether to use this transport only for logs.

  • 1 — This destination will be skipped for regular backups.
  • 0 — Both log and regular backups will be uploaded.

This setting defaults to 0. The only time log files get their own backup is via scripts/remote_log_transfer

passive0 | 1
Example:1

Whether to use passive FTP.

  • 1 — Use passive FTP.
  • 0 — Use active FTP.

Note:

This parameter is only valid for the FTP backup type.

passphrasestring
Example:123456luggage

The private key file's passphrase, if the authtype parameter is the key value.

Note:

This parameter is only valid for the following backup types:

  • SFTP
  • Rsync
pathstring
Example:backups

The path to the backups directory on the remote server.

  • This parameter is required for the Local backup type.
  • If you do not use this parameter, the system will not set a value.

Note:

This parameter is only valid for the following backup types:

  • Backblaze
  • Custom
  • Local
  • FTP
  • SFTP
  • Rsync
  • WebDAV
portinteger
Example:21

The TCP port to use.

Note:

  • This parameter defaults to the standard port used by the queried backup type parameter.
  • This parameter is only valid for the following backup types:
    • FTP
    • SFTP
    • Rsync
    • WebDAV
privatekeystring
Example:/home/backups/key

The file path to the private key file, if the authtype parameter is the key value.

Note:

This parameter is only valid for the following backup types:

  • SFTP
  • Rsync
ssl0 | 1
Example:1

Whether to use SSL.

  • 1 — Use SSL.
  • 0 — Do not use SSL.

Note:

This parameter is only valid for the WebDAV backup type.

timeoutinteger
Example:30

The session timeout, measured in seconds.

Note:

  • This parameter is not valid for the Local backup type parameter.
  • The default value depends on the type parameter's value.
upload_system_backup0 | 1
Example:1

Whether to upload system backups.

  • 1 — Upload system backups.
  • 0 — Do not upload system backups.

Response

HTTP Request was successful.

Example response

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