All Products
Search
Document Center

ApsaraDB for Redis:Clear data

Last Updated:Mar 27, 2024

You can clear all expired data or all data of your ApsaraDB for Redis instance in the console.

Procedure

Note

Even if you disable the FLUSHALL command on the Parameter Settings page, the Clear Data feature can still be used in the console.

  1. Log on to the ApsaraDB for Redis console and go to the Instances page. In the top navigation bar, select the region in which the instance that you want to manage resides. Then, find the instance and click the instance ID.

  2. On the Instance Information page, click Clear Data in the upper-right corner.

  3. In the dialog box that appears, select the data that you want to clear.

    Figure 1. Clear data 清除数据

    • All Data: runs the FLUSHALL command to clear all data of the instance. Cleared data cannot be restored.

    • Expired Data: runs the SCAN command to batch clear all expired data of the instance. Cleared data cannot be restored. You can select Upgrade Now or Update During Maintenance.

    Warning

    Data clearing takes effect immediately and cleared data cannot be restored. This may affect your business. Proceed with caution. We recommend that you back up the data of your Redis instance before you clear data. For more information, see Automatic or manual backup.

  4. Click OK.

    Note

    If you select All Data, you can specify whether to back up the data after you click OK.

Related API operations

API operation

Description

FlushInstance

Clears all data in a Redis instance.

FlushExpireKeys

Clears all expired keys in a Redis instance.

References