cPanel WHM icon

cPanel WHM

Full cPanel WHM API — all 622 operations across Accounts, DNS, Mail, SSL, Backups, Databases and more

Actions262

Backup → Add a backup destination

AI-generated

Summary

Add a new backup destination to the WHM server by specifying its type and relevant configuration parameters to enable server backups to remote or local locations.

Inputs

  • Type (required) — Select the backup destination type, such as Custom, FTP, Local, SFTP, WebDAV, AmazonS3, Rsync, GoogleDrive, S3Compatible, or Backblaze. The type determines which other parameters are applicable.
  • Name (required) — Specify a unique name for the backup destination.
  • Disabled (required) — Choose whether to enable (0) or disable (1) the backup destination.
  • Host — Enter the remote server hostname. Required for Custom, FTP, SFTP, Rsync, WebDAV, and S3Compatible types.
  • Username — Provide the username for remote server account. Applicable to Custom, FTP, SFTP, Rsync, and WebDAV types.
  • Password — Set the password or secret access key for the remote account or cloud service. Applies to AmazonS3, Custom, FTP, SFTP, Rsync, WebDAV, and S3Compatible types.
  • Application Key — Name of the application key for Backblaze B2 backups.
  • Application Key Id — Backblaze B2 application key ID for authentication.
  • Aws Access Key Id — Access key ID for AmazonS3 and S3Compatible backups.
  • Bucket — Amazon S3 or S3Compatible bucket name.
  • Bucket Id — Backblaze bucket ID.
  • Bucket Name — Backblaze bucket name.
  • Client Id — Google Drive client ID for GoogleDrive backups.
  • Client Secret — Google Drive client secret for GoogleDrive backups.
  • Authtype — Authentication method for SFTP and Rsync types; either password or key.
  • Privatekey — File path to private key if using key-based authentication for SFTP and Rsync.
  • Passphrase — Passphrase for the private key for SFTP and Rsync.
  • Port — TCP port to connect to, defaulting per backup type, applicable to FTP, SFTP, Rsync, and WebDAV.
  • Script — Absolute path to a transport script, required for Custom backup destinations.
  • Folder — Path to the backups directory on the remote server or storage, for AmazonS3, GoogleDrive, and S3Compatible.
  • Path — Path for Local backup type backups directory on the server.
  • Mount — For Local type, indicates if the path is mounted (1) or not (0).
  • No Mount Fail — For Local type, whether backup fails if mount fails (1) or not (0).
  • Only Used For Logs — Indicates if the destination is used only for logs (1) or for all backups (0).
  • Passive — For FTP type, choose passive (1) or active (0) FTP mode.
  • Ssl — For WebDAV, whether to use SSL (1) or not (0).
  • Timeout — Session timeout in seconds, not valid for Local type backups.
  • Upload System Backup — Specify if system backups should be uploaded to this destination (1) or not (0).

Output shape

a single JSON object representing the added backup destination's details or operation result

Returns the WHM API response confirming the creation of the backup destination, including any error detail if applicable.

Examples

Example 1: Add an Amazon S3 backup destination

Set type to AmazonS3, provide Access Key ID, Bucket, Password (secret access key), and name the destination; optionally configure the folder path and whether to upload system backups.

Links

Discussion