As more users use Redis for persistent storage, higher requirements are raised for data reliability. The data backup and restoration feature in ApsaraDB for Redis improves data reliability.

Automatic backup by using backup policies

Background information

As more applications use Redis for persistent storage, an automatic backup mechanism is required to back up data on a regular basis. This way, data can be restored if user errors occur. ApsaraDB for Redis uses Redis database backup (RDB) snapshots to back up data on replica nodes. The backup process does not have negative impacts on the performance of your instance. You can configure a custom backup policy in the console.

Procedure

  1. Log on to the ApsaraDB for Redis console.
  2. On the top of the page, select the region where the instance is deployed.
  3. On the Instance List page, click the Instance ID of the instance.
  4. In the left-side navigation pane, click Backup and Recovery.
  5. Click the Backup Settings tab.
  6. Specify the backup cycle and time for an automatic backup.
    Notice By default, backup data is retained for seven days. You cannot modify this configuration.
  7. Click OK.

Manual backup (instant backup)

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

  1. Log on to the ApsaraDB for Redis console.
  2. On the top of the page, select the region where the instance is deployed.
  3. On the Instance List page, click the Instance ID of the instance.
  4. In the left-side navigation pane, click Backup and Recovery.
  5. Click Create Backup in the upper-right corner.
  6. Click OK.
    Notice In the Backups section, you can select a time range to query historical backup data. Backups are retained for seven days.

Backup archive

Background information

Due to industry regulations or corporate policy requirements, you may need to periodically archive backup data for Redis. ApsaraDB for Redis provides a backup archive feature, which is free of charge. You can use this feature to store backup files that are automatically or manually created in Object Storage Service (OSS) buckets. You can store backup files in Alibaba Cloud OSS buckets free of charge for up to seven days. After seven days, the backup files are automatically deleted.

To retain backup files for a longer period, you can copy the URLs of the backup files from the console and download the backup files to an on-premises machine.

Procedure

  1. Log on to the ApsaraDB for Redis console.
  2. On the top of the page, select the region where the instance is deployed.
  3. On the Instance List page, click the Instance ID of the instance.
  4. In the left-side navigation pane, click Backup and Recovery.
  5. Select the backup sets that you want to archive and click Download Backups.

Data restoration

Solution Description
Restore data from a backup set to a new instance ApsaraDB for Redis allows you to create an instance from a specified backup set. Data in the new instance is the same as that in the backup set. This feature can be applied in scenarios such as data recovery, quick workload deployment, and data verification.
Notice Data restoration in the console is not applicable to cluster instances. To restore data for cluster instances, use redis-shake.
Data flashback The data flashback feature supported by ApsaraDB for Redis 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 suitable for scenarios in which data is frequently restored. It allows you to prevent data loss caused by user errors.
Use the redis-shake tool to back up data You can use redis-shake that runs on an Elastic Compute Service (ECS) instance to restore data from on-premises backup files to an ApsaraDB for Redis instance.

Related API operations

API operation Description
CreateBackup Manually backs up an ApsaraDB for Redis instance.
DescribeBackupPolicy Queries the backup policy of an ApsaraDB for Redis instance, which includes the backup cycle and backup time.
ModifyBackupPolicy Modifies the backup policy of an ApsaraDB for Redis instance.
DescribeBackups Queries information about backups of an ApsaraDB for Redis instance.
RestoreInstance Restores the data in a backup file to a specified ApsaraDB for Redis instance.