All Products
Search
Document Center

Hybrid Backup Recovery:CreateRestoreJob

Last Updated:Nov 14, 2022

Creates a restore job.

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

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 was 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 about server backup.

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"]
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. This value is a UNIX timestamp. Unit: seconds.

1642496881
OtsDetailOtsTableRestoreDetailNo

The details about the Tablestore instance.

instancename
TargetTableNamestringNo

The name of the table that stores the restored data.

tablename
TargetTimelongNo

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

1642496881
OtsDetailOtsTableRestoreDetailNo

The details about the Tablestore instance.

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.

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

The ID of the restore job.

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

Example

Request example

http(s)://[Endpoint]/?Action=CreateRestoreJob
&RestoreType=ECS_FILE
&VaultId=v-*********************
&SnapshotId=s-********************
&SnapshotHash=f2fe...
&SourceType=ECS_FILE
&TargetFileSystemId=005494
&TargetCreateTime=1554347313
&TargetPath=C:\
&TargetBucket=hbr-backup-oss
&TargetPrefix=hbr
&TargetInstanceId=i-*********************
&Include=["/home/alice/*.pdf", "/home/bob/*.txt"]
&Exclude=["/var", "/proc"]
&TargetInstanceName=instancename
&TargetTableName=tablename
&TargetTime=1642496881
&OtsDetail={"OverwriteExisting":false,"BatchChannelCount":2}
&Common request parameters

Normal return example

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 API error center.