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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes RestoreInstance

The operation that you want to perform. Set the value to RestoreInstance.

BackupId String Yes 78241****

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

InstanceId String Yes r-bp1zxszhcgatnx****

The ID of the instance.

RegionId String No cn-hangzhou

The ID of the region where the instance is deployed.

Response parameters

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

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

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

JSON format

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

Error codes

For a list of error codes, visit the API Error Center.