Creates a restore job.
Operation description
- You must create a restore job based on the specified backup snapshot and restore destination.
- The type of the data source from which you restore data must be the same as the type of the restore destination.
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:CreateRestoreJob | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RestoreType | string | Yes | The type of the restore destination. Valid values:
| ECS_FILE |
VaultId | string | Yes | The ID of the backup vault to which the backup snapshot belongs. | v-********************* |
SnapshotId | string | Yes | The ID of the backup snapshot. | s-******************** |
SnapshotHash | string | No | The hash value of the backup snapshot. | f2fe... |
SourceType | string | Yes | The type of the data source. Valid values:
| ECS_FILE |
TargetFileSystemId | string | No | This parameter is required only if the RestoreType parameter is set to NAS. This parameter specifies the ID of the file system to which you want to restore data. | 005494 |
TargetCreateTime | long | No | This parameter is required only if the RestoreType parameter is set to NAS. This parameter specifies the time when the file system is created. | 1554347313 |
TargetPath | string | No | This parameter is required only if the RestoreType parameter is set to ECS_FILE. This parameter specifies the destination file path. | C:\ |
TargetBucket | string | No | This parameter is required only if the RestoreType parameter is set to OSS. This parameter specifies the name of the OSS bucket to which you want to restore data. | hbr-backup-oss |
TargetPrefix | string | No | This parameter is required only if the RestoreType parameter is set to OSS. This parameter specifies the prefix of objects that you want to restore. | hbr |
UdmDetail | object | No | The details of ECS instance backup. | {\"sourceInstanceId\":\"i-uf62te6pm3iwsyxyz66q\",\"bootAfterRestore\":false} |
UdmRegionId | string | No | This parameter is required only if you set the SourceType parameter to UDM_ECS. This parameter specifies the region to which you want to restore data. | cn-shanghai |
TargetInstanceId | string | No | This parameter is required only if the RestoreType parameter is set to ECS_FILE. This parameter specifies the ID of the ECS instance to which you want to restore data. | i-********************* |
Include | string | No | The paths to the files that you want to restore. All files in the specified paths are restored. The value must be 1 to 255 characters in length. | ["/home/alice/*.pdf", "/home/bob/*.txt"] |
Exclude | string | No | The paths to the files that you do not want to restore. No files in the specified paths are restored. The value must be 1 to 255 characters in length. | ["/var", "/proc"] |
TargetContainer | string | No | The details about the container to which you want to restore data. | {\"host\":\"k8s-node1\",\"hostPrefix\":\"/var/lib/kubelet/pods/4acb31fe-8577-40ff-bc8c-eccabd835f73/volumes/kubernetes.io~csi/pvc-b050b00e-ef17-4792-aab1-1642355cf1f4/mount\",\"pvPath\":\"/\"} |
InitiatedByAck | boolean | No | Specifies whether to initiate the request by using Container Service for Kubernetes (ACK). Default value: false. | false |
TargetContainerClusterId | string | No | The ID of the container cluster to which you want to restore data. | cc-000amjsc7o1h9506oob7 |
TargetInstanceName | string | No | The name of the Tablestore instance to which you want to restore data. | instancename |
TargetTableName | string | No | The name of the table that stores the restored data. | tablename |
TargetTime | long | No | The time when data is restored to the Tablestore instance. The value must be a UNIX timestamp. Unit: seconds. | 1642496881 |
OtsDetail | OtsTableRestoreDetail | No | The details about the Tablestore instance. | |
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. | 158975xxxxx4625 |
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": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"Success": true,
"RestoreId": "r-*********************"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|