When more and more businesses use Redis as the primary persistent storage engine, users raise higher requirements for data reliability. Based on Redis backup and recovery solutions, ApsaraDB for Redis has comprehensively optimized its data reliability.

Automatic backup (backup policy)

Background

An increasing number of applications use Redis for persistent storage. In this case, an automatic backup mechanism is required to back up data periodically so that you can quickly recover data in the event of misoperation. ApsaraDB for Redis uses RDB snapshots to back up data on secondary nodes. The backup process has no impact on the performance of your instance. You can also conveniently customize a backup policy in the console.

Procedure

  1. Log on to the ApsaraDB for Redis console.
  2. In the upper-left corner of the top navigation bar, select the region where the target instance is located.
  3. On the Instance List page, click the target instance ID or Manage in the Action column for the target instance.
  4. In the left-side navigation pane, click Backup and Recovery.
  5. Click the Backup Settings tab.
  6. Click Edit to customize the automatic backup cycle and backup time.
    Notice Backup data is kept for seven days by default. You cannot modify this setting.
  7. Click Confirm to set the automatic backup policy.

Manual backup (instant backup)

In addition to automatic backup, you can also manually back up data at any time in the console.

  1. Log on to the ApsaraDB for Redis console.
  2. In the upper-left corner of the top navigation bar, select the region where the target instance is located.
  3. On the Instance List page, click the target instance ID or Manage in the Action column for the target instance.
  4. In the left-side navigation pane, click Backup and Recovery.
  5. Click Create Backup in the upper-right corner.
  6. In the dialog box that appears, click Confirm to instantly back up data for the instance.
    Notice On the Data Backup tab, you can select the time range to query historical backup data. Backup data is kept for seven days by default. You can query the historical backup data in the last seven days.

Backup archiving

Background

Due to industry regulatory or corporate policy requirements, you may need to regularly archive backup data for Redis. ApsaraDB for Redis provides a backup archiving feature free of charge to automatically store the automatic and manual backup files in Object Storage Service (OSS). Currently, Alibaba Cloud stores your backup files in OSS free of charge for seven days. After seven days, the backup files are automatically deleted.

To archive these backup files for a longer period, you can copy their URLs in the console and download the database backup files to a local directory.

Procedure

  1. Log on to the ApsaraDB for Redis console.
  2. In the upper-left corner of the top navigation bar, select the region where the target instance is located.
  3. On the Instance List page, click the target instance ID or Manage in the Action column for the target instance.
  4. In the left-side navigation pane, click Backup and Recovery.
  5. On the Data Backup tab, select the backup set to be archived and click Download in the Action column.

Data recovery

ApsaraDB for Redis provides a data recovery feature to minimize the loss caused by database misoperation. You can recover data from backup files in the console.

Recover data in the console

Notice Data recovery in the console does not apply to instances of the cluster edition. To recover data in instances of the cluster edition, see Use the redis-shake tool to migrate data from an RDB file.
  1. Log on to the ApsaraDB for Redis console.
  2. In the upper-left corner of the top navigation bar, select the region where the target instance is located.
  3. On the Instance List page, click the target instance ID or Manage in the Action column for the target instance.
  4. In the left-side navigation pane, click Backup and Recovery.
  5. On the Backup and Recovery page, click the Data Backup tab.
  6. Select the time range for the data to be recovered and click Search. Select the target backup set and click Restore Data.
  7. In the Data Recovery dialog box, click Confirm to directly recover data to the target instance. Alternatively, you can click Clone Instance to create an instance and recover the backup data to this new instance. After confirming that the recovered data is correct, you can recover data to the target instance.
    Notice Data recovery operations are highly risky. We recommend that you clone an instance to recover data if time permits. This solution allows you to create a pay-as-you-go instance and recover data from a backup set to this new instance. After confirming that the recovered data is correct, you can recover data to the target instance.

Instance cloning

Background

During routine maintenance, O&M engineers often need to quickly deploy an application. In normal cases, they can easily deploy an application in an ECS instance created based on an image file. If a database is required, the deployment is more complex. O&M engineers need to purchase or install a database, and then initialize relevant database scripts, for example, to create tables, triggers, and views. In this scenario, they must perform many trivial operations, which result in a high error rate. Especially in the gaming industry that requires fast service activation, engineers have to quickly deploy an application multiple times per day.

To resolve this pain point, ApsaraDB for Redis develops an instance cloning feature. It enables you to create a subscription or pay-as-you-go instance based on backup files. Then, you can easily develop and deploy a database on the GUI, which significantly improves productivity.

Notice Instance cloning only applies to non-cluster instances in Redis 2.8. To clone instances of other editions, see Use the redis-shake tool to migrate data from an RDB file.

Procedure

  1. Log on to the ApsaraDB for Redis console.
  2. In the upper-left corner of the top navigation bar, select the region where the target instance is located.
  3. On the Instance List page, click the target instance ID or Manage in the Action column for the target instance.
  4. In the left-side navigation pane, click Backup and Recovery.
  5. On the Data Backup tab, select the target backup set and click Clone Instance.

Related API operations