WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/backup_config_get
- A server running WHM.
https://whm-server.tld:2087/json-api/backup_config_get
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/backup_config_get{ "data": { "backup_config": { … } }, "metadata": { "command": "backup_config_get", "reason": "OK", "result": 1, "version": 1 } }
Whether to enable daily backups.
1— Enable.0— Disable.
The number of daily backups to retain.
Which days of the month to run backups.
Note:
To add multiple days, use a comma-delimited list.
Whether to enable monthly backups.
1— Enable.0— Disable.
The number of monthly backups to retain.
Which day of the week to run weekly backups.
0— Sunday.1— Monday.2— Tuesday.3— Wednesday.4— Thursday.5— Friday.6— Saturday.
Whether to enable weekly backups.
1— Enable.0— Disable.
The number of weekly backups to retain.
Whether to back up cPanel user accounts.
1— Back up.0— Do not back up.
Note:
This setting affects whether the system enables the File and Directory Restoration interfaces in cPanel and in WHM. For more information, read the How to Manage Metadata Settings documentation.
Whether to back up bandwidth tracking data.
1— Back up.0— Do not back up.
Which days of the week to run daily backups.
0— Sunday.1— Monday.2— Tuesday.3— Wednesday.4— Thursday.5— Friday.6— Saturday.
Note:
For multiple days, use a comma-delimited list.
Whether to enable backups.
1— Enable.0— Disable.
Note:
This setting affects whether the system enables the File and Directory Restoration interfaces in cPanel and in WHM. For more information, read the How to Manage Metadata Settings documentation.
Whether to back up system files.
1— Back up.0— Do not back up.
Whether to back up the error logs.
1— Back up.0— Do not back up.
Whether to mount a backup partition.
1— Mount.0— Do not mount.
Note:
This setting affects whether the system enables the File and Directory Restoration interfaces in cPanel and in WHM. For more information, read the How to Manage Metadata Settings documentation.
Whether to back up suspended accounts.
1— Back up.0— Do not back up.
The type of backup to create.
compresseduncompressedincremental
Whether to ensure that the destination server possesses the minimum free disk space available.
1— Check the free disk space on the destination server.0— Do not check the free disk space on the destination server.
Whether the backup system will create metadata when a backup runs.
1— Disable metadata creation.0— Enable metadata creation.
Note:
This setting affects whether the system enables the File and Directory Restoration interfaces in cPanel and in WHM. For more information, read the How to Manage Metadata Settings documentation.
The number of times that the system will try to use the additional backup destination.
Whether to strictly enforce the value of the backup_daily_retention parameter.
1— Strictly enforce thebackup_daily_retentionparameter.0— Only enforce thebackup_daily_retentionparameter after a successful complete backup.
Whether to strictly enforce the value of the backup_monthly_retention parameter.
1— Strictly enforce thebackup_monthly_retentionparameter.0— Only enforce thebackup_monthly_retentionparameter after a successful complete backup.
Whether to strictly enforce the value of the backup_weekly_retention parameter.
1— Strictly enforce thebackup_weekly_retentionparameter.0— Only enforce thebackup_weekly_retentionparameter after a successful complete backup.
Whether to delete backups from the local directory.
1— Delete.0— Do not delete.
Note:
This setting affects whether the system enables the File and Directory Restoration interfaces in cPanel and in WHM. For more information, read the How to Manage Metadata Settings documentation.
Whether to check the rsync function for hardlink support.
1— Check.0— Do not check.
Whether to use a local zone file from the /var/named/domain.tld file or the dnsadmin daemon, where domain.tld represents the target domain.
1— Use the/var/named/domain.tldfile.0— Usednsadmin.
How long a restoration will attempt to run, in seconds. If the restoration does not succeed in this amount of time, it will stop.
How long a backup will attempt to run, in seconds. If the backup does not succeed in this amount of time, it will stop.
The minimum amount of free disk to check for on the destination server.
Note:
If the value of the min_free_space_unit parameter is percent, the maximum value is 100.
The units of measurement of disk space for the min_free_space return.
MB— Megabytes.percent— Percent available.
The backup method to use for MySQL® databases.
accounts— Back up databases in each account's archive.dir— Back up the entire MySQL directory.both— Back up databases in each account's archive and the entire MySQL directory.
Whether to run the /usr/local/cpanel/scripts/postcpbackup script after the backup finishes.
1— Run.0— Do not run.
Whether to run the /usr/local/cpanel/scripts/precpbackup script before the system processes backups.
1— Run.0— Do not run.
Whether to back up PostgreSQL® databases.
1— Back up.0— Do not back up.
The directory that temporarily stores a remote backup's data during a backup restoration. The data is a compressed (.tar.gz) or uncompressed (.tar) account tarball.
Important:
The system restores backups one at a time. The backup staging directory must be large enough to contain the largest remote backup file that you wish to restore. For example, if you wish to restore three backups, sized 1.5 GB, 528 MB, and 950 MB each, your backup staging directory must be able to hold at least 1.5 GB.
Note:
The system empties the directory after the system restores the backup.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/backup_config_set
- A server running WHM.
https://whm-server.tld:2087/json-api/backup_config_set
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/backup_config_set?backup_daily_enable=1&backup_daily_retention=5&backup_monthly_dates=1&backup_monthly_enable=0&backup_monthly_retention=5&backup_weekly_day=1&backup_weekly_enable=0&backup_weekly_retention=4&backupaccts=1&backupbwdata=1&backupdays=0%2C1%2C2%2C3%2C4%2C5%2C6&backupdir=%2Fbackup&backupenable=0&backupfiles=1&backuplogs=0&backupmount=0&backupsuspendedaccts=0&backuptype=compressed&check_min_free_space=1&disable_metadata=0&errorthreshhold=3&force_prune_daily=0&force_prune_monthly=0&force_prune_weekly=0&gziprsyncopts=--rysncable&keeplocal=1&linkdest=0&localzonesonly=0&maximum_restore_timeout=21600&maximum_timeout=7200&min_free_space=1024&min_free_space_unit=MB&mysqlbackup=accounts&postbackup=0&prebackup=1&psqlbackup=0&remote_restore_staging_dir=%2Fbackup'{ "metadata": { "command": "backup_config_set", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/backup_date_list
- A server running WHM.
https://whm-server.tld:2087/json-api/backup_date_list
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/backup_date_list{ "data": { "backup_set": [ … ] }, "metadata": { "command": "backup_date_list", "reason": "OK", "result": 1, "version": 1 } }