We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

Child pages
  • WHM API 1 Functions - backup_set_list_combined
Skip to end of metadata
Go to start of metadata

Description

This function lists locally-stored and backup-destination stored backup files for the server's accounts.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/backup_set_list_combined?api.version=1
 Command Line
whmapi1 backup_set_list_combined


Notes:

  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
	"data": {
		"destination_legend": {
			"LmTZCUpqqLSPH8AO7pVtIeNK": {
				"type": "Local",
				"name": "local_dest"
			},
			"GLT1vFsVO8cqk2UWWFpJ9kSQ": {
				"type": "Local",
				"name": "extra_directory"
			}
		},
		"backup_set": {

			"example": [{
					"when": "2019-02-13",
					"where": "local"
				},
				{
					"when": "2019-02-06",
					"where": "local"
				},
				{
					"where": "local",
					"when": "2019-02-15"
				},
				{
					"where": "local",
					"when": "2019-01-15"
				}
			],
			"example2": [{
					"where": "local",
					"when": "2019-02-13"
				},
				{
					"when": "2019-02-06",
					"where": "local"
				},
				{
					"when": "2019-02-15",
					"where": "local"
				},
				{
					"when": "2019-01-15",
					"where": "local"
				}
			]
		}
	},
	"metadata": {
		"reason": "OK",
		"result": 1,
		"command": "backup_set_list_combined",
		"version": 1
	}
}


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
backup_sethash of arraysA hash of arrays that contains the server's cPanel account usernames and their backup information.This hash of arrays includes the username array of hashes.

username

array of hashes

An array of hashes that contains backup file information. 

Note:

This return name is the cPanel account's username.

The function returns this value in the backup_set hash of arrays.

This array of hashes contains the when and where hashes.

when

timestamp

The backup file's saved date.

The function returns this value in the username array of hashes.

A date in YYYY-MM-DD format, where:

  • YYYY represents the year.
  • MM represents the month.
  • DD represents the day.

2018-12-15

where

string

The saved backup file's server location.

The function returns this value in the username array of hashes.

  • local 
  • remote 
local
destination_legendhashA hash of hashes that contains a backup's destination and type information.This hash includes the destination ID hash.

destination ID

hash

A hash of backup destination information. 

Note:

This return name is the destination's identification string.

The function returns this value in the destination_legend hash of hashes.

This hash contains the name and type returns.


name

string

The backup destination's name.

The function returns this value in the destination ID hash.

A valid string.local_dest

type

string

The transport type.

The function returns this value in the destination ID hash.

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