All Products
Search
Document Center

Hybrid Backup Recovery:CreateBackupJob

Last Updated:Nov 14, 2022

Create a backup job.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
JobNamestringNo

The name of a backup job.

k8s-backup-infra-20220131150046-hbr
SourceTypestringYes

The backup type. Valid value: CONTAINER, which indicates container backup.

CONTAINER
RetentionlongYes

The retention period of backup data.

15
BackupTypestringNo

The backup type. Valid value:

  • COMPLETE: full backup.
  • INCREMENTAL: incremental backup.
INCREMENTAL
VaultIdstringNo

The ID of a vault.

v-000h3tvhlkali7o5xy1v
SpeedLimitstringNo

This parameter indicates the throttling rules. Format: {start}{end}{bandwidth}. Multiple throttling rules are separated with vertical bars ({start}|{end}|{bandwidth}). A specified time range cannot overlap with another one.

  • start: the start hour
  • end: the end hour
  • bandwidth: the bandwidth. Unit: KB/s.
0:24:NaN
OptionsstringNo

This parameter indicates whether Windows VSS is used to define a backup path.

  • This parameter is available only for Windows ECS instances.
  • If data changes occur in the backup source, the source data must be the same as the data to be backed up before the system sets this parameter to ["UseVSS":true].
  • If you use VSS, you cannot back up data from multiple directories.
{"UseVSS":false}
IncludestringNo

The paths to the files that are included in the backup job.

["/home/alice/*.pdf", "/home/bob/*.txt"]
ExcludestringNo

This parameter indicates the paths to the files that are excluded from the backup job. The value must be 1 to 255 characters in length.

["/var", "/proc"]
ClusterIdstringNo

The ID of a cluster.

cl-00068btz******oku
ContainerResourcesstringNo

The information about container resources.

[{\"resourceType\":\"PV\",\"backupMethod\":\"FILE\",\"resourceId\":\"674dac6d-74cd-47e9-a675-09e2f10d2c45\",\"resourceInfo\":\"{\\\"pv_name\\\":\\\"nas-650dac6d-74cd-47e9-a675-09e2f10d2c45\\\",\\\"pv_size\\\":\\\"8Gi\\\",\\\"storage_class\\\":\\\"alibabacloud-cnfs-nas\\\",\\\"pvc_name\\\":\\\"data-postgresql-default-0\\\",\\\"namespace\\\":\\\"database\\\"}\",\"host\":\"cn-huhehaote.192.168.13.133\",\"hostPrefix\":\"6f5e758e-8d35-4584-b9ce-8333adfc7547/volumes/kubernetes.io~csi/nas-670dac6d-74cd-47e9-a675-09e2f10d2c45/mount\",\"pvPath\":\"/\"}]
ContainerClusterIdstringNo

The cluster id of container.

cc-000f23fcdspg5a6x4i00
ContainerClusterIdstringNo

The ID of container cluster. This parameter needs to be configured when the SourceType value is CONTAINER.

cc-000f23fcdspg5a6x4i00

Response parameters

ParameterTypeDescriptionExample
object

The reponse body.

Codestring

The HTTP status code. The status code 200 indicates that the call is successful.

200
Messagestring

The message that is returned. If the call is successful, "successful" is returned. If the call fails, an error message is returned.

successful
RequestIdstring

The ID of the request.

25F49E7B-7E39-542E-83AD-62E6E7F73786
Successboolean

Indicates whether the call is successful.

  • true: The call is successful.
  • false: The call fails.
true
JobIdstring

The ID of the backup job.

job-000csy09q50a2jdcbwbo

Example

Normal return example

JSONFormat

{
  "Code": "200",
  "Message": "successful",
  "RequestId": "25F49E7B-7E39-542E-83AD-62E6E7F73786",
  "Success": true,
  "JobId": "job-000csy09q50a2jdcbwbo"
}

Error codes

For a list of error codes, visit the API error center.