RestoreInstance
Recovers data from a specified backup file to an ApsaraDB Tair (Redis® OSS-Compatible) database instance.
Operation description
If your instance is a Tair (Enterprise Edition) memory-optimized instance with the classic architecture, you can call this operation to restore specified keys in the current instance to a specific point in time accurate to seconds for more fine-grained data restoration.
For other instance types, call the CreateInstance or CreateTairInstance operation to restore backup data to a new instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
kvstore:RestoreInstance |
update |
*DBInstance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
r-bp1zxszhcgatnx**** |
| BackupId |
string |
No |
The ID of the backup file for the instance. You can call the DescribeBackups operation to query the ID. |
78241**** |
| RestoreType |
string |
No |
The restoration type. Valid values:
Valid values:
|
1 |
| RestoreTime |
string |
No |
The point in time to which you want to restore data. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. Note
The point in time cannot be earlier than the time when the data flashback feature is enabled. |
2021-07-06T07:25:57Z |
| FilterKey |
string |
No |
The keys to restore. Regular expressions are supported. Separate multiple values with commas (,).
Note
For example, in a regular expression, an asterisk ( |
key:00000007198* |
| TimeShift |
string |
No |
When you restore a classic edition instance, you can shift the expiration time of keys regardless of whether you restore full data or specified keys. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. The instance calculates the expiration time by adding the remaining time to live (TTL) of the keys at the specified flashback point in time to the specified expiration shift point in time. Note
|
2021-07-06T08:25:57Z |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
8D0C0AFC-E9CD-47A4-8395-5C31BF9B**** |
Examples
Success response
JSON format
{
"RequestId": "8D0C0AFC-E9CD-47A4-8395-5C31BF9B****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.