You can call this operation to recover the data in a backup file to a specified ApsaraDB for Redis instance.

For more information about how to perform the corresponding operation in the console, see Back up and recover data in the console.

Note When you call this operation, the existing data of the ApsaraDB for Redis instance will be overwritten by the data in the backup file. Due to the risk involved, we recommend that you call this operation with caution.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Example Description
Action String Yes RestoreInstance

The operation that you want to perform. Set this parameter to RestoreInstance.

InstanceId String Yes r-bp1xxxxxxxxxxxxx

The ID of the instance to which you want to recover data.

BackupId String Yes 111111111

The ID of the backup file. You can call the DescribeBackups operation to query the IDs of backup files.

AccessKeyId String No Lxxxxxxxxxxxxxxw

The AccessKey ID that Alibaba Cloud provides for you to access services.

Response parameters

Parameter Type Example Description
RequestId String 8D0C0AFC-E9CD-47A4-8395-5C31BF9B3E76

The ID of the request.

Examples

Sample request


https://r-kvstore.aliyuncs.com
? Action=RestoreInstance
&InstanceId=r-bp1xxxxxxxxxxxxx
&BackupId=111111111
&<Common request parameters>

Sample success response

XML format

<RestoreInstanceResponse>
  <RequestId>8D0C0AFC-E9CD-47A4-8395-5C31BF9B3E76</RequestId>
</RestoreInstanceResponse>

JSON format

{
	"RequestId":"8D0C0AFC-E9CD-47A4-8395-5C31BF9B3E76"
}

Error codes

View error codes.