All Products
Search
Document Center

Cloud Backup:CreateBackupJob

Last Updated:Mar 03, 2024

Creates a backup job.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
JobNamestringNo

The name of the backup job.

k8s-backup-infra-20220131150046-hbr
SourceTypestringYes

The type of the data source. Valid values:

  • ECS_FILE: Elastic Compute Service (ECS) files
  • UDM_ECS: ECS instances
  • CONTAINER: containers
CONTAINER
RetentionlongYes

The retention period of the backup data. Unit: days.

15
InstanceIdstringYes

This parameter is required only if you set the SourceType parameter to UDM_ECS. This parameter specifies the ID of the ECS instance.

i-bp1xxxxxxxxxxxxxxysm
BackupTypestringNo

The backup type. Valid values:

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

The ID of the backup vault.

v-000xxxxxxxxxxxxxxy1v
SpeedLimitstringNo

This parameter is required only if you set the SourceType parameter to ECS_FILE. This parameter specifies the throttling rules. Format: {start}|{end}|{bandwidth}. Separate multiple throttling rules with vertical bars (|). A specified time range cannot overlap with another time range.

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

This parameter is required only if you set the SourceType parameter to ECS_FILE. This parameter specifies whether to use Windows Volume Shadow Copy Service (VSS) to define a source 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 you can set this parameter to ["UseVSS":true].
  • If you use VSS, you cannot back up data from multiple directories.
{"UseVSS":false}
IncludestringNo

This parameter is required only if you set the SourceType parameter to ECS_FILE. This parameter specifies the paths to the files that you want to back up. The value must be 1 to 255 characters in length.

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

This parameter is required only if you set the SourceType parameter to ECS_FILE. This parameter specifies 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 the cluster.

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

The cluster resources. This parameter is required only if you set the SourceType parameter to CONTAINER.

[{\"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\":\"/\"}]
InitiatedByAckbooleanNo

This parameter specifies whether to initiate the request by using Container Service for Kubernetes (ACK). Default value: false.

false
ContainerClusterIdstringNo

The ID of the cluster. This parameter is required only if you set the SourceType parameter to CONTAINER.

cc-000xxxxxxxxxxxxxxi00
CrossAccountTypestringNo

Specifies whether data is backed up within the same Alibaba Cloud account or across Alibaba Cloud accounts. Valid values:

  • SELF_ACCOUNT: Data is backed up within the same Alibaba Cloud account.
  • CROSS_ACCOUNT: Data is backed up across Alibaba Cloud accounts.
SELF_ACCOUNT
CrossAccountUserIdlongNo

The ID of the source Alibaba Cloud account that authorizes the current Alibaba Cloud account to back up data across Alibaba Cloud accounts.

158975xxxxxx4625
CrossAccountRoleNamestringNo

The name of the RAM role that is created within the source Alibaba Cloud account and assigned to the current Alibaba Cloud account to authorize the current Alibaba Cloud account to back up data across Alibaba Cloud accounts.

BackupRole

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The HTTP status code. The status code 200 indicates that the request was successful.

200
Messagestring

The returned message. If the request was successful, "successful" is returned. If the request failed, an error message is returned.

successful
RequestIdstring

The request ID.

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

Indicates whether the request was successful. Valid values:

  • true
  • false
true
JobIdstring

The ID of the backup job.

job-000csy09q50a2jdcbwbo

Examples

Sample success responses

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 Service error codes.

Change history

Change timeSummary of changesOperation
No change history