RestoreInstance

Updated at: 2025-03-27 11:38

Restores the data in a backup file to a specified ApsaraDB for Redis instance.

Operation description

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
OperationAccess levelResource typeCondition keyAssociated operation
kvstore:RestoreInstanceupdate
*DBInstance
acs:kvstore:{#regionId}:{#accountId}:instance/{#instanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the instance.

r-bp1zxszhcgatnx****
BackupIdstringNo

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

78241****
RestoreTypestringNo

The restoration mode. Valid values:

  • 0 (default): The parameter is invalid.
  • 1: restores data to a specified point in time. You can specify this value only if the data flashback feature is enabled for the instance. If you specify this value, you also need to set the RestoreTime parameter.
1
RestoreTimestringNo

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.

Note
The point in time cannot be earlier than the point in time when the data flashback feature is enabled.
2021-07-06T07:25:57Z
FilterKeystringNo

The key that you want to restore. You can specify multiple keys. Separate multiple keys with commas (,). Regular expressions are supported.

  • If you do not specify this parameter, the entire instance is restored.
  • If you specify this parameter, only the involved keys are restored. Only classic instances support this feature.
Note
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*
TimeShiftstringNo

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.

Note
  • This feature applies only to keys and does not work on elements in the self-developed data structures of Tair, such as fields in exHash and skeys in TairTS.

  • This time point must be between the specified flashback time point and the submission time of the data restoration task.

2021-07-06T08:25:57Z

Response parameters

ParameterTypeDescriptionExample
ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

8D0C0AFC-E9CD-47A4-8395-5C31BF9B****

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError message
HTTP status codeError codeError message
400ServiceNotSupportThis service not supported.
400MissingParameterMissing Required Param: BackupId or RestoreTime or RestoreType.
400ResroreParamNotMatchrestoreType is not match with backupId or restoreTime.
400InvalidRestoreTime.FormatSpecified restore time is not valid.
400ZoneMigrationError.StillingRunningZone migration task is still running
400InvalidBinlog.NotValidThe available binlog is not valid in recovery time.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
Change timeSummary of changesOperation
2023-07-20API Description Update. The Error code has changedView Change Details
2022-11-22The Error code has changed. The request parameters of the API has changedView Change Details
  • On this page (1)
  • Operation description
  • Debugging
  • Authorization information
  • Request parameters
  • Response parameters
  • Examples
  • Error codes
  • Change history
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare