All Products
Search
Document Center

Tair (Redis® OSS-Compatible):Clear data

Last Updated:Feb 07, 2025

You can clear all expired data or all data of your Tair (Redis OSS-compatible) 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 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 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 an instance.

FlushExpireKeys

Clears all expired keys in an instance.

References

FAQ

  • Why does the status of an instance change to Cleaning up Expired Data after I select Update During Maintenance?

    The instance does not delete expired data in advance. This status does not affect the services provided by the instance. The instance cleans up expired data only within the maintenance window.

  • Why am I unable to run the FLUSHALL or FLUSHDB command in Data Management (DMS)?

    FLUSHDB and FLUSHALL are high-risk commands and are therefore prohibited from being executed in DMS. If necessary, you can refer to this topic to perform operations in the Tair (Redis OSS-compatible) console or run related commands on a client such as redis-cli.