All Products
Search
Document Center

Cloud Backup:CreateRestoreJob

Last Updated:Jul 30, 2026

Creates a restore job.

Operation description

  • Creates a restore job based on the selected snapshot and restore destination.

  • The data source type and the restore destination data source type must be the same.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

hbr:CreateRestoreJob

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RestoreType

string

Yes

The data source type of the restore destination. Valid values:

  • ECS_FILE: restores to an ECS file.

  • OSS: restores to Alibaba Cloud OSS.

  • NAS: restores to Alibaba Cloud NAS.

  • COMMON_FILE_SYSTEM: restores to CPFS.

  • OTS_TABLE: restores to Alibaba Cloud OTS.

  • UDM_ECS_ROLLBACK: restores to an Alibaba Cloud ECS instance (full-copy migration).

ECS_FILE

VaultId

string

No

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

v-*********************

SnapshotId

string

No

The ID of the backup snapshot.

s-********************

SnapshotHash

string

No

The hash value of the backup snapshot.

f2fe...

SourceType

string

Yes

The data source type. Valid values:

  • ECS_FILE: restores ECS files.

  • OSS: restores Alibaba Cloud OSS.

  • NAS: restores Alibaba Cloud NAS.

  • COMMON_FILE_SYSTEM: restores to CPFS.

  • OTS_TABLE: restores to Alibaba Cloud OTS.

  • UDM_ECS: restores to an Alibaba Cloud ECS instance (full-copy migration).

ECS_FILE

Options

string

No

The restore job parameters.

{\"includes\":[],\"excludes\":[],\"conflictPolicy\":\"OVERWRITE_EXISTING\"}

TargetFileSystemId

string

No

This parameter is valid only when RestoreType is set to NAS. The file system ID of the restore destination.

005494

TargetCreateTime

integer

No

This parameter is valid only when RestoreType is set to NAS. The creation time of the destination file system. This value is a UNIX timestamp. Unit: seconds.

1554347313

TargetPath

string

No

This parameter is valid only when RestoreType is set to ECS_FILE. The file path of the restore destination.

C:\

TargetBucket

string

No

This parameter is valid only when RestoreType is set to OSS. The name of the destination OSS bucket.

hbr-backup-oss

TargetPrefix

string

No

This parameter is valid only when RestoreType is set to OSS. The object prefix of the restore destination.

hbr

UdmDetail

object

No

This parameter is valid only when SourceType is set to UDM_ECS. The details of the full-copy migration backup. This parameter is a JSON string. The details vary depending on the value of RestoreType:

  • UDM_ECS_DISK: ECS cloud disk clone.
    • targetInstanceId: string type, required. Instance ID of the target ECS instance to which the cloned cloud disk is attached.

    • diskCategory: string type, required. The type of the target cloud disk.

    • diskPerformanceLevel: string type. If diskCategory is set to essd, this parameter specifies the performance level (PL) of the cloud disk. Valid values: PL0, PL1, PL2, and PL3. Default value: PL1.

  • UDM_ECS_DISK_ROLLBACK: ECS cloud disk restoration.
    • sourceInstanceId: string type, required. Instance ID of the source ECS instance.

    • foreceRestore: bool type. Default value: false. Specifies whether to forcibly restore. If foreceRestore is set to true, the restore job still restores the cloud disk even if the backed-up cloud disk has been unmounted from the original ECS instance or attached to a new ECS instance. Proceed with caution.

    • bootAfterRestore: bool type. Default value: false. Specifies whether to start the ECS instance after restoration.

  • UDM_ECS: ECS full-copy clone.
    • bootAfterRestore: bool type. Default value: false. Specifies whether to start the ECS instance after restoration.

    • diskCategory: string type, required. The type of the target cloud disk.

    • diskPerformanceLevel: string type. If diskCategory is set to essd, this parameter specifies the performance level (PL) of the cloud disk. Valid values: PL0, PL1, PL2, and PL3. Default value: PL1.

    • instanceType: string type, required. The instance type of the target ECS instance.

    • restoredNetwork: string type, required. The vSwitch ID of the target ECS instance.

    • securityGroup: string type, required. The security group ID of the target ECS instance.

    • restoredName: string type, required. The instance name of the target ECS instance.

    • restoredHostName: string type, required. The hostname of the target ECS instance.

    • allocatePublicIp: bool type. Default value: false. Specifies whether to assign a public IP address to the target ECS instance.

    • privateIpAddress: string type. The internal IP address of the target ECS instance. If this parameter is not specified, DHCP is used to randomly assign an IP address.

  • UDM_ECS_ROLLBACK: ECS full-copy restoration.
    • sourceInstanceId: string type, required. Instance ID of the source ECS instance.

    • forceRestore: bool type. Default value: false. Specifies whether to forcibly restore. If foreceRestore is set to true, the restore job still restores the cloud disk even if the backed-up cloud disk has been unmounted from the original ECS instance or attached to a new ECS instance. Proceed with caution.

    • bootAfterRestore: bool type. Default value: false. Specifies whether to start the ECS instance after restoration.

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

UdmRegionId

string

No

This parameter is valid only when SourceType is set to UDM_ECS. The destination region for restoration.

cn-shanghai

TargetInstanceId

string

No

This parameter is valid only when RestoreType is set to ECS_FILE. The ECS instance ID of the restore destination.

i-*********************

Include

string

No

The path to restore. All files under this path are restored. Maximum length: 255 characters.

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

Exclude

string

No

The path to exclude from restoration. All files under this path are not restored. Maximum length: 255 characters.

["/var", "/proc"]

TargetContainer

string

No

The details of the target container for restoration.

{\"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 the operation is invoked by Container Service. Default value: false.

false

TargetContainerClusterId

string

No

The ID of the target container cluster for restoration.

cc-000amjsc7o1h9506oob7

TargetInstanceName

string

No

The name of the target Tablestore instance for restoration.

instancename

TargetTableName

string

No

The name of the target data table in Tablestore for restoration.

tablename

TargetTime

integer

No

The point in time to which the Tablestore data is restored. This value is a UNIX timestamp. Unit: seconds.

1642496881

OtsDetail OtsTableRestoreDetail

No

The details of the Tablestore instance.

CrossAccountType

string

No

The cross-account backup type. Valid values:

  • SELF_ACCOUNT: backup within the current account.

  • CROSS_ACCOUNT: cross-account backup.

SELF_ACCOUNT

CrossAccountUserId

integer

No

The ID of the source account for cross-account backup managed by the current account.

158975xxxxx4625

CrossAccountRoleName

string

No

The name of the RAM role created in the source account for cross-account backup managed by the current account.

BackupRole

FailbackDetail

object

No

The details of the restoration to the local host.

{"cpu":4,"extra":"{\"restoreVMNamePrefix\":\"627-\",\"dataCenterName\":\"SDDC-Datacenter\",\"dataStoreId\":\"datastore-50\",\"folderId\":\"group-v49\",\"resourcePoolId\":\"resgroup-46\",\"locationName\":\"vcenter.pc-uf600a******1.acvs.aliyuncs.com/SDDC-Datacenter/Workloads\",\"computeResourceName\":\"SDDC-Datacenter/Default_c-uf600a******\",\"dataStoreName\":\"Default_c-uf600a******/WorkloadDatastore\",\"networkMoReference\":\"DistributedVirtualPortgroup:dvportgroup-1001\",\"useHotAdd\":false}","instanceId":"i-2vc******z","memoryInMB":8192,"serverId":"0fdc0c86-eb92-4e05-91ab-eeaf9fb6ad01","uefiBoot":false}

Edition

string

No

The Cloud Backup feature edition. Valid values:

  • STANDARD: Standard Edition. This is the default value.

  • BASIC: Essential Edition. Currently, only ECS File Backup Essential Edition is supported.

STANDARD

Response elements

Element

Type

Description

Example

object

Code

string

The response code. The value 200 indicates success.

200

Message

string

The response message. The value "successful" is returned for a success. An error message is returned for a failure.

successful

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Success

boolean

Indicates whether the request was successful.

  • true: The request was successful.

  • false: The request failed.

true

RestoreId

string

The ID of the restore job.

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

Examples

Success response

JSON format

{
  "Code": "200",
  "Message": "successful",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "Success": true,
  "RestoreId": "r-*********************"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.