In the console, you can purge all data or only expired data from a Tair (Redis OSS-compatible) instance.
Procedure
Disabling the FLUSHALL command in Parameter Settings does not affect the Clear Data feature in the console.
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.
On the Instance Information page, click Clear Data in the upper-right corner.
In the dialog box that appears, select the data to purge:
Figure 1. Purge data

All Data: This operation runs the FLUSHALL command to purge all data from the instance. After the data is purged, it cannot be recovered.
Expired Data: This operation runs the SCAN command to purge all expired data from the instance in batches. After the data is purged, it cannot be recovered. You can choose to Execute Now or run the task during the maintenance window.
WarningData purged using this feature cannot be recovered. The operation takes effect immediately and affects your online services. Proceed with caution. We recommend that you back up the instance data before you purge it. For more information, see Automatic or manual backup.
Click OK.
For security purposes, complete the secondary authentication as prompted, such as Multi-Factor Authentication (MFA). You will not need to authenticate again for 15 minutes.
Related API operations
API operation | Description |
Purges all data from an instance. | |
Purges expired keys from an instance. | |
Purges all data from a specified DB of an instance. |
References
For more information about how to delete expired keys, see Clear expired keys
For more information about how to schedule expired keys to be automatically deleted on a regular basis, see Use OOS to periodically delete expired keys of Tair or Redis.
FAQ
Q: Why does the instance status change to Accelerating Expired Data Purge even if I set the running time to Execute During Maintenance Window?
A: The instance does not delete expired data in advance. This status does not affect the services that the instance provides. The instance purges expired data at an accelerated rate only during the maintenance window.
Q: Why can't I run the FLUSHALL and FLUSHDB commands in Data Management (DMS)?
A: FLUSHDB and FLUSHALL are high-risk commands and are disabled in DMS. To run these commands, you can use the Tair (Redis OSS-compatible) console as described in this topic or a client such as redis-cli.