Restores the data in a backup file to a specified ApsaraDB for Redis instance.
Operation description
- If your instance is a DRAM-based instance or a persistent memory-optimized instance and has the data flashback feature enabled, you can call this operation to restore the entire instance or specific keys to a specific point in time accurate to the second. This way, you can achieve more fine-grained data restoration.
- For other types of instances, we recommend that you call the CreateInstance or CreateTairInstance operation to restore the backup data to a new instance.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
kvstore:RestoreInstance | update | *DBInstance acs:kvstore:{#regionId}:{#accountId}:instance/{#instanceId} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
InstanceId | string | Yes | The ID of the instance. | r-bp1zxszhcgatnx**** |
BackupId | string | No | The ID of the backup file. You can call the DescribeBackups operation to query the IDs of backup files. | 78241**** |
RestoreType | string | No | The restoration mode. Valid values:
| 1 |
RestoreTime | string | No | The point in time to which you want to restore data. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC.
The point in time cannot be earlier than the point in time when the data flashback feature is enabled.
| 2021-07-06T07:25:57Z |
FilterKey | string | No | The key that you want to restore. You can specify multiple keys. Separate multiple keys with commas (,). Regular expressions are supported.
In a regular expression, an asterisk ( * ) matches zero or more occurrences of a subexpression that occurs before. For example, if you set this parameter to h.*llo , strings such as hllo and heeeello are matched.
| key:00000007198* |
TimeShift | string | No | When you restore a classic instance, regardless of whether you choose to restore all data or specific keys, you can apply an offset to the expiration time of the keys. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. A key expires after the remaining validity period of the key elapses based on the expiration offset time point.
| 2021-07-06T08:25:57Z |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "8D0C0AFC-E9CD-47A4-8395-5C31BF9B****"
}
Error codes
HTTP status code | Error code | Error message |
---|
HTTP status code | Error code | Error message |
---|---|---|
400 | ServiceNotSupport | This service not supported. |
400 | MissingParameter | Missing Required Param: BackupId or RestoreTime or RestoreType. |
400 | ResroreParamNotMatch | restoreType is not match with backupId or restoreTime. |
400 | InvalidRestoreTime.Format | Specified restore time is not valid. |
400 | ZoneMigrationError.StillingRunning | Zone migration task is still running |
400 | InvalidBinlog.NotValid | The available binlog is not valid in recovery time. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|
Change time | Summary of changes | Operation |
---|---|---|
2023-07-20 | API Description Update. The Error code has changed | View Change Details |
2022-11-22 | The Error code has changed. The request parameters of the API has changed | View Change Details |