CreateRestoreJob

Updated at:

Creates a restore job.

Operation description

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

  • The data source type must match the data source type of the restore destination.

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 data to ECS files.

  • OSS: Restores data to Alibaba Cloud OSS.

  • NAS: Restores data to Alibaba Cloud NAS.

  • COMMON_FILE_SYSTEM: Restores data to CPFS.

  • OTS_TABLE: Restores data to Alibaba Cloud Tablestore.

  • UDM_ECS_ROLLBACK: Restores data to an entire Alibaba Cloud ECS instance.

  • CPFS: Restores data to CPFS (agentless).

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 data from Alibaba Cloud OSS.

  • NAS: Restores data from Alibaba Cloud NAS.

  • COMMON_FILE_SYSTEM: Restores data from CPFS with agent-based backup.

  • OTS_TABLE: Restores data from Alibaba Cloud Tablestore.

  • UDM_ECS: Restores data from an entire Alibaba Cloud ECS instance.

  • CPFS: Restores data from CPFS with agentless backup.

ECS_FILE

Options

string

No

The parameters of the restore job.

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

TargetFileSystemId

string

No

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

005494

TargetCreateTime

integer

No

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

1554347313

TargetPath

string

No

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

C:\

TargetBucket

string

No

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

hbr-backup-oss

TargetPrefix

string

No

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

hbr

UdmDetail

object

No

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

  • UDM_ECS_DISK: ECS cloud disk cloning.
    • targetInstanceId: string. Required. Instance ID of the destination ECS instance to which the cloned cloud disk is to be mounted.

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

    • diskPerformanceLevel: string. The performance level of the cloud disk. This parameter is valid when diskCategory is set to essd. Valid values: PL0, PL1, PL2, and PL3. Default value: PL1.

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

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

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

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

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

    • diskPerformanceLevel: string. The performance level of the cloud disk. This parameter is valid when diskCategory is set to essd. Valid values: PL0, PL1, PL2, and PL3. Default value: PL1.

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

    • restoredNetwork: string. Required. The vSwitch ID of the destination ECS instance.

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

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

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

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

    • privateIpAddress: string. The internal IP address of the destination ECS instance. If this parameter is not specified, an IP address is randomly assigned by using DHCP.

  • UDM_ECS_ROLLBACK: Entire ECS instance restoration.
    • sourceInstanceId: string. Required. Instance ID of the source ECS instance.

    • forceRestore: bool. Default value: false. Specifies whether to force the restoration. If forceRestore is set to true and the backed-up cloud disk has been unmounted from the original ECS instance or mounted to a new ECS instance, the restore job still restores the cloud disk. Proceed with caution.

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

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

UdmRegionId

string

No

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

cn-shanghai

TargetInstanceId

string

No

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

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

Include

string

No

The paths 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 to exclude from the restoration. 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 for the 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 service invocation is invoked by Container Service. Default value: false.

false

TargetContainerClusterId

string

No

The ID of the destination container cluster for the restoration.

cc-000amjsc7o1h9506oob7

TargetInstanceName

string

No

The name of the destination Tablestore instance for the restoration.

instancename

TargetTableName

string

No

The name of the destination Tablestore table for the restoration.

tablename

TargetTime

integer

No

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

1642496881

OtsDetail OtsTableRestoreDetail

No

The details of the Tablestore instance.

CrossAccountType

string

No

The cross-account backup type. Valid values:

  • SELF_ACCOUNT: current account backup

  • CROSS_ACCOUNT: cross-account backup

SELF_ACCOUNT

CrossAccountUserId

integer

No

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

158975xxxxx4625

CrossAccountRoleName

string

No

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

BackupRole

FailbackDetail

object

No

The details of the restoration to the on-premises environment.

{"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. Only ECS File Backup Essential Edition is supported.

STANDARD

Response elements

Element

Type

Description

Example

object

Code

string

The return code. A value of 200 indicates success.

200

Message

string

The return message. "successful" is returned if the request is successful. An error message is returned if the request fails.

successful

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Success

boolean

Indicates whether the request is successful. Valid values:

  • true: The request is successful.

  • false: The request fails.

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.