You can clear all expired data or all data of your Tair (Redis OSS-compatible) instance in the console.
Procedure
Even if you disable the FLUSHALL command on the Parameter Settings page, the Clear Data feature can still be used 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 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.
WarningData 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.
Click OK.
NoteIf you select All Data, you can specify whether to back up the data after you click OK.
Related API operations
API operation | Description |
Clears all data in an instance. | |
Clears all expired keys in an instance. |
References
For more information about how to delete expired keys, see How do I delete expired keys in ApsaraDB for Redis?
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
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.