Creates a backup job.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
hbr:CreateBackupJob | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
JobName | string | No | The name of the backup job. | k8s-backup-infra-20220131150046-hbr |
SourceType | string | Yes | The type of the data source. Valid values:
Enumeration Value:
| CONTAINER |
Retention | long | Yes | The retention period of the backup data. Unit: days. | 15 |
InstanceId | string | No | This parameter is required only if you set the SourceType parameter to UDM_ECS. This parameter specifies the ID of the Elastic Compute Service (ECS) instance. | i-bp1xxxxxxxxxxxxxxysm |
Detail | object | No | The details about ECS instance backup. The value is a JSON string.
| { "doCopy": false, "destinationRegionId": "", "destinationRetention": null, "diskIdList": [], "snapshotGroup": false, "appConsistent": false, "enableWriters": true, "preScriptPath": "", "postScriptPath": "", "enableFsFreeze": true, "timeoutInSeconds": 60 } |
BackupType | string | No | The backup type. Valid values:
Enumeration Value:
| INCREMENTAL |
VaultId | string | No | The ID of the backup vault. | v-000xxxxxxxxxxxxxxy1v |
SpeedLimit | string | No | This parameter is required only if you set the SourceType parameter to ECS_FILE. This parameter specifies the throttling rules. Format:
| 0:24:NaN |
Options | string | No | 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.
| {"UseVSS":false} |
Include | string | No | 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"] |
Exclude | string | No | 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"] |
ClusterId | string | No | The ID of the cluster. | cl-00068btz******oku |
ContainerResources | string | No | 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\":\"/\"}] |
InitiatedByAck | boolean | No | This parameter specifies whether to initiate the request by using Container Service for Kubernetes (ACK). Default value: false. | false |
ContainerClusterId | string | No | The ID of the cluster. This parameter is required only if you set the SourceType parameter to CONTAINER. | cc-000xxxxxxxxxxxxxxi00 |
CrossAccountType | string | No | Specifies whether data is backed up within the same Alibaba Cloud account or across Alibaba Cloud accounts. Valid values:
| SELF_ACCOUNT |
CrossAccountUserId | long | No | The ID of the source Alibaba Cloud account that authorizes the current Alibaba Cloud account to back up data across Alibaba Cloud accounts. | 158975xxxxxx4625 |
CrossAccountRoleName | string | No | 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
Examples
Sample success responses
JSON
format
{
"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 time | Summary of changes | Operation |
---|