All Products
Search
Document Center

Cloud Backup:CreateRestoreJob

Last Updated:Sep 18, 2025

Creates a restore job.

Operation description

  • This operation creates a restore job based on the selected backup snapshot and restore destination.

  • The source and destination data source types 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 type of the destination data source. Valid values:

  • ECS_FILE: Restores Elastic Compute Service (ECS) files.

  • OSS: Restores data to Object Storage Service (OSS).

  • NAS: Restores data to Apsara File Storage NAS.

  • OTS_TABLE: Restores data to Tablestore.

  • UDM_ECS_ROLLBACK: Rolls back an entire ECS instance.

ECS_FILE

VaultId

string

No

The ID of the backup repository 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 type of the data source. Valid values:

  • ECS_FILE: Restores ECS files.

  • OSS: Restores OSS data.

  • NAS: Restores NAS data.

  • OTS_TABLE: Restores Tablestore data.

  • UDM_ECS: Restores an entire ECS instance.

ECS_FILE

Options

string

No

The parameters for the restore job.

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

TargetFileSystemId

string

No

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

005494

TargetCreateTime

integer

No

The time when the destination file system was created. This parameter is valid only when RestoreType is set to NAS.

1554347313

TargetPath

string

No

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

C:\

TargetBucket

string

No

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

hbr-backup-oss

TargetPrefix

string

No

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

hbr

UdmDetail

object

No

The details of the entire instance backup. This parameter is a JSON string and is valid only when SourceType is set to UDM_ECS. The content of this parameter varies based on the value of RestoreType:

  • UDM_ECS_DISK: Clones an ECS disk.
    • targetInstanceId: A string. Required. The ID of the destination ECS instance to which the cloned disk is attached.

    • diskCategory: A string. Required. The type of the destination disk.

    • diskPerformanceLevel: A string. The performance level of the disk when diskCategory is set to essd. Supported values are PL0, PL1, PL2, and PL3. The default value is PL1.

  • UDM_ECS_DISK_ROLLBACK: Recovers an ECS disk.
    • sourceInstanceId: A string. Required. The ID of the source ECS instance.

    • forceRestore: A boolean. The default value is false. Specifies whether to force the recovery. If you set forceRestore to true, the disk is recovered even if it has been uninstalled from the original ECS instance or attached to a new ECS instance. Use this option with caution.

    • bootAfterRestore: A boolean. The default value is false. Specifies whether to start the ECS instance after it is recovered.

  • UDM_ECS: Clones an entire ECS instance.
    • bootAfterRestore: A boolean. The default value is false. Specifies whether to start the ECS instance after it is recovered.

    • diskCategory: A string. Required. The type of the destination disk.

    • diskPerformanceLevel: A string. The performance level of the disk when diskCategory is set to essd. Supported values are PL0, PL1, PL2, and PL3. The default value is PL1.

    • instanceType: A string. Required. The instance type of the destination ECS instance.

    • restoredNetwork: A string. Required. The ID of the virtual switch for the destination ECS instance.

    • securityGroup: A string. Required. The ID of the security group for the destination ECS instance.

    • restoredName: A string. Required. The name of the destination ECS instance.

    • restoredHostName: A string. Required. The hostname of the destination ECS instance.

    • allocatePublicIp: A boolean. The default value is false. Specifies whether to assign a public IP address to the destination ECS instance.

    • privateIpAddress: A string. The internal IP address of the destination ECS instance. If you do not specify this parameter, a random IP address is assigned using DHCP.

  • UDM_ECS_ROLLBACK: Rolls back an entire ECS instance.
    • sourceInstanceId: A string. Required. The ID of the source ECS instance.

    • forceRestore: A boolean. The default value is false. Specifies whether to force the recovery. If you set forceRestore to true, the disk is recovered even if it has been uninstalled from the original ECS instance or attached to a new ECS instance. Use this option with caution.

    • bootAfterRestore: A boolean. The default value is false. Specifies whether to start the ECS instance after it is recovered.

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

UdmRegionId

string

No

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

cn-shanghai

TargetInstanceId

string

No

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

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

Include

string

No

The paths of the files to restore. All files in the specified paths are restored. The value can be up to 255 characters in length.

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

Exclude

string

No

The paths of the files to exclude from the restore job. All files in the specified paths are not restored. The value can be up to 255 characters in length.

["/var", "/proc"]

TargetContainer

string

No

The details of the destination container.

{\"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 restore job is initiated by Container Service for Kubernetes (ACK). The default value is false.

false

TargetContainerClusterId

string

No

The ID of the destination container cluster.

cc-000amjsc7o1h9506oob7

TargetInstanceName

string

No

The name of the destination Tablestore instance.

instancename

TargetTableName

string

No

The name of the destination table in the Tablestore instance.

tablename

TargetTime

integer

No

The time to which you want to restore the Tablestore data. This is a UNIX timestamp. Unit: seconds.

1642496881

OtsDetail OtsTableRestoreDetail

No

The details of the Tablestore instance.

CrossAccountType

string

No

The type of the cross-account backup. Valid values:

  • SELF_ACCOUNT: Backs up data within the same account.

  • CROSS_ACCOUNT: Backs up data across accounts.

SELF_ACCOUNT

CrossAccountUserId

integer

No

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

158975xxxxx4625

CrossAccountRoleName

string

No

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

BackupRole

FailbackDetail

object

No

The details for failing back to an on-premises instance.

{"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 edition of Cloud Backup. Valid values:

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

  • BASIC: Basic Edition. This edition is available only for File Backup Essential Edition for ECS.

STANDARD

Response elements

Element

Type

Description

Example

object

Code

string

The response code. A value of 200 indicates that the request is successful.

200

Message

string

The returned message. If the request is successful, `successful` is returned. If the request fails, an error message is returned.

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.