All Products
Search
Document Center

Cloud Backup:CreateRestoreJob

Last Updated:Mar 03, 2024

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

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
RestoreTypestringYes

The type of the restore destination. Valid values:

  • ECS_FILE: restores data to Elastic Compute Service (ECS) files.
  • OSS: restores data to Object Storage Service (OSS) buckets.
  • NAS: restores data to Apsara File Storage NAS file systems.
  • OTS_TABLE: restores data to Tablestore instances.
  • UDM_ECS_ROLLBACK: restores data to ECS instances.
ECS_FILE
VaultIdstringYes

The ID of the backup vault to which the backup snapshot belongs.

v-*********************
SnapshotIdstringYes

The ID of the backup snapshot.

s-********************
SnapshotHashstringNo

The hash value of the backup snapshot.

f2fe...
SourceTypestringYes

The type of the data source. Valid values:

  • ECS_FILE: ECS files
  • OSS: OSS buckets
  • NAS: NAS file systems
  • OTS_TABLE: Tablestore instances
  • UDM_ECS: ECS instances
ECS_FILE
TargetFileSystemIdstringNo

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
TargetCreateTimelongNo

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
TargetPathstringNo

This parameter is required only if the RestoreType parameter is set to ECS_FILE. This parameter specifies the destination file path.

C:\
TargetBucketstringNo

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
TargetPrefixstringNo

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
UdmDetailobjectNo

The details of ECS instance backup.

{\"sourceInstanceId\":\"i-uf62te6pm3iwsyxyz66q\",\"bootAfterRestore\":false}
UdmRegionIdstringNo

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
TargetInstanceIdstringNo

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-*********************
IncludestringNo

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"]
ExcludestringNo

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"]
TargetContainerstringNo

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

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

false
TargetContainerClusterIdstringNo

The ID of the container cluster to which you want to restore data.

cc-000amjsc7o1h9506oob7
TargetInstanceNamestringNo

The name of the Tablestore instance to which you want to restore data.

instancename
TargetTableNamestringNo

The name of the table that stores the restored data.

tablename
TargetTimelongNo

The time when data is restored to the Tablestore instance. The value must be a UNIX timestamp. Unit: seconds.

1642496881
OtsDetailOtsTableRestoreDetailNo

The details about the Tablestore instance.

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.

158975xxxxx4625
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 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.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
Successboolean

Indicates whether the call is successful. Valid values:

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

The ID of the restore job.

r-*********************

Examples

Sample success responses

JSONformat

{
  "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 timeSummary of changesOperation
No change history