Creates a backup job.
Try it now
Test
RAM authorization
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:
Valid values:
|
CONTAINER |
| Retention |
integer |
No |
The retention period of the backup data. Unit: days. |
15 |
| InstanceId |
string |
No |
Required only if SourceType is set to UDM_ECS. The ID of the ECS instance. |
i-bp1xxxxxxxxxxxxxxysm |
| Detail |
object |
No |
Required only if SourceType is set to UDM_ECS. A JSON string with the following fields:
|
{ "doCopy": false, "destinationRegionId": "", "destinationRetention": null, "diskIdList": [], "snapshotGroup": false, "appConsistent": false, "enableWriters": true, "preScriptPath": "", "postScriptPath": "", "enableFsFreeze": true, "timeoutInSeconds": 60 } |
| BackupType |
string |
No |
The backup type. This parameter is required only if you set the SourceType parameter to UDM_ECS.
Valid values:
|
INCREMENTAL |
| VaultId |
string |
No |
The ID of the backup vault. This parameter is not required if you set the SourceType parameter to UDM_ECS. |
v-000xxxxxxxxxxxxxxy1v |
| SpeedLimit |
string |
No |
Does not take effect if SourceType is set to UDM_ECS. Specifies throttling rules. Format:
|
0:24:NaN |
| Options |
string |
No |
You do not need to specify this parameter. |
{"UseVSS":false} |
| Include |
string |
No |
Does not take effect if SourceType is set to UDM_ECS. The paths to the files to back up. Maximum length: 255 characters. |
["/home/alice/*.pdf", "/home/bob/*.txt"] |
| Exclude |
string |
No |
Does not take effect if SourceType is set to UDM_ECS. The paths to the files to exclude from backup. Maximum length: 255 characters. |
["/var", "/proc"] |
| ClusterId |
string |
No |
You do not need to specify this parameter. |
cl-00068btz******oku |
| ContainerResources |
string |
No |
You do not need to specify this parameter. |
[{\"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 |
false or left empty |
false |
| ContainerClusterId |
string |
No |
You do not need to specify this parameter. |
cc-000xxxxxxxxxxxxxxi00 |
| CrossAccountType |
string |
No |
Whether to back up data within the same Alibaba Cloud account or across accounts. Valid values:
|
SELF_ACCOUNT |
| CrossAccountUserId |
integer |
No |
The ID of the source Alibaba Cloud account that authorizes the current account for cross-account backup. |
158975xxxxxx4625 |
| CrossAccountRoleName |
string |
No |
The name of the RAM role created within the source Alibaba Cloud account and assigned to the current account for cross-account backup authorization. |
BackupRole |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The HTTP status code. 200 indicates a successful request. |
200 |
| Message |
string |
The returned message. Returns "successful" on success or an error message on failure. |
successful |
| RequestId |
string |
The request ID. |
25F49E7B-7E39-542E-83AD-62E6E7F73786 |
| Success |
boolean |
Whether the request was successful. Valid values:
|
true |
| JobId |
string |
The ID of the backup job. |
job-000csy09q50a2jdcbwbo |
Examples
Success response
JSON format
{
"Code": "200",
"Message": "successful",
"RequestId": "25F49E7B-7E39-542E-83AD-62E6E7F73786",
"Success": true,
"JobId": "job-000csy09q50a2jdcbwbo"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.