This topic describes how to use the data flashback feature provided by ApsaraDB for Redis. This allows you to restore data to a specific point in time. During the retention period of backup files, the data flashback feature provides a solution to restore data to a specific point in time. This feature is applicable to scenarios where you want to frequently restore data. It also allows you to avoid data loss caused by user errors.
- The instance is of Enhanced Edition (Performance-enhanced instances).
- The instance is of a standard architecture or a cluster architecture.
- The major version of the ApsaraDB for Redis instance is Redis 5.0.
- The minor version of the instance is upgraded to the latest version. For more information,
see Upgrade the minor version.
Note If the Upgrade Minor Version button is dimmed, the current minor version is the latest version.
- By default, AOF persistence is enabled. For more information, see AOF persistence.
ApsaraDB for Redis features high performance, flexible architecture, high data security, and high availability. An increasing number of applications use ApsaraDB for Redis as the database engine for persistent storage. Therefore, a reliable persistence mechanism and an accurate data restoration feature are required. You can use RDB snapshots for automatic or manual backup. ApsaraDB for Redis optimizes the AOF persistence mechanism to perform incremental backups. This allows you to restore data within a few seconds and improve the efficiency of operations and maintenance (O&M).
After you enable the data flashback feature, the AOF backup data is retained for up to seven days. During the retention period, the system creates an instance and restores data to a specified point in time that is accurate to the second. This allows you to restore data at an accurate time point.
- You can restore data only to a specific point in time during the period from the time when the data flashback feature is enabled to the current time. This period can be up to seven days.
- After the data flashback feature is enabled, the point in time for data backup may be changed due to configuration changes, migration across zones, or minor version upgrades. For example, if you change the configurations of an instance, the point in time that you can restore data starts from the time when the configuration change is complete.
- After you enable the data flashback feature, it requires about 10 minutes for the system to upload data and logs.
|Enable the data flashback feature||Free of charge.|
|Perform data flashback||
- Log on to the ApsaraDB for Redis console.
- On the top of the page, select the region where the instance is deployed.
- On the Instance List page, click the Instance ID of the instance.
- In the left-side navigation pane, click Backup and Recovery.
- On the Backup and Recovery page, click the Data Flashback tab.
- Click Enable Now to enable the data flashback feature.Note
- If the appendonly parameter is set to no, AOF persistence is disabled. In the dialog box that appears, you are prompted to enable the AOF feature. For more information, see AOF persistence.
- If you want to enable only the data flashback feature, you can skip Step 7.
- Optional:Perform data flashback to restore data of a specific point in time to a new instance.
After you complete the payment, the system creates a new instance based on the backup data at the specified point in time.
- On the Data Flashback tab, click Enable Now.
- Read the information in the dialog box and click OK.
- On the Clone Instance page, select one of the following billing methods:
- Subscription: You must pay for an instance when you create the instance. We recommend that you select this billing method for long-term use because it is more cost-effective than the pay-as-you-go billing method. Higher discounts are offered for longer subscription periods.
- Pay-as-you-go: You must pay for the instance on an hourly basis based on your actual usage. We recommend that you select this billing method for short-term use. You can release your pay-as-you-go instance to reduce costs when it is no longer required.
- The following table describes the parameters that you need to set for the newly created
Parameter Description Clone Source Type Select Backup Timepoint. Backup Timepoint Specifies a point in time that is accurate to the second. You can specify a point in time within the last seven days and restore data based on the backup file of this point in time. Zone The zone of the cluster. Each zone is an isolated geographical area within a region. The zones whinin the same region are similar. Network Type
- Classic Network: a traditional network type.
- VPC: the recommended network type. A VPC network is an isolated virtual network that provides higher security and better performance than a classic network.
- Make sure that the network type of the ApsaraDB for Redis instance is the same as that of the ECS instance. This ensures the interconnection over an internal network.
- If the network type for both the ECS instance and the ApsaraDB for Redis instance is VPC, these two instances must be deployed in the same VPC for interconnection over an internal network.
- You can switch the network type of an ApsaraDB for Redis instance from classic network to VPC, but cannot switch from VPC to classic network. For more information, see Switch to VPC network.
VSwitch A vSwitch is the basic network module that is used to build a VPC. If no vSwitch is available in the VPC, you must create a vSwitch. For more information, see Create a vSwitch. Edition Select Enhanced Edition (Tair). For more information, see Overview. Series Select Enhanced Performance. For more information, see Performance-enhanced instances. Version The engine version of the ApsaraDB for Redis instance. Architecture Type Select Cluster or Standard based on your business requirements.Note Read-Write Splitting is not supported.
- Cluster: Cluster instances use an architecture with multiple data shards. Each data shard runs in a master-replica architecture.
- Standard: Standard master-replica instances run in a master-replica architecture to ensure high availability.
Shards The number of shards on a cluster instance. Node Type If Architecture Type is set to Standard or Cluster, Node Type can be set to only Master-Replica. A master-replica node runs in a two-node hot standby mode and supports data persistence. Instance Type Each instance type contains a group of configurations, such as the memory capacity, maximum number of connections, and maximum bandwidth. For more information, see Overview.Note
- Make sure that the selected memory capacity for the new instance is larger than the required memory for restoring data.
- After you create an ApsaraDB for Redis instance, metadata for a database is generated.
The metadata consumes a small amount of storage:
- The metadata size of standard instances is 30 MB to 50 MB.
- The metadata size on each shard of cluster instances is 30 MB to 50 MB. The total size of metadata of a cluster instance equals the sum of metadata on each shard of the cluster instance.
Set Password The password that is used to connect to the instance.
- Now: In the Password field, enter a password.
- Later: Set the password after the instance is created. For more information, see Change or reset the password.
Instance Name The name of the new instance. Duration Select a subscription duration for the instance. You can select one to nine months for a monthly subscription or select one to three years for an annual subscription.
- Read and accept the agreement of service.
- In the lower-right corner of the page, click Pay or Activate, and perform the following steps to complete the payment.