Purge data

更新时间:
复制 MD 格式

You can use the console to purge all data or expired data from a Tair (Redis OSS-compatible) instance.

Procedure

Note

Disabling the FLUSHALL command in Parameter Settings does not affect the Purge Data feature 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 Purge Data in the upper-right corner.

  3. In the dialog box, select the data to purge.

    Figure 1. In the Purge Data dialog box, you can select the All Data or Expired Data tab.

    • All Data: This operation executes the FLUSHALL command to delete all data in the instance. After the data is deleted, it cannot be recovered.

    • Expired data: This operation runs the SCAN command to delete all expired data from the instance in batches. The data cannot be recovered after it is deleted. You can select Execute Immediately or execute the operation during the maintenance window.

    Warning

    Purging data is an irreversible action that can affect your online services. Proceed with caution. Before you purge data, back up the instance. For more information, see automatic or manual backup.

  4. Click OK.

    Complete secondary authentication (such as Multi-Factor Authentication (MFA)) as prompted. After you pass authentication, no re-authentication is required for 15 minutes.

Related APIs

API

Description

FlushInstance

Purges all data from an instance.

FlushExpireKeys

Purges the expired keys from an instance.

FlushInstanceForDB

Purges all data from a specified DB in an instance.

References

FAQ

  • Q: Why did the instance status change to Cleaning up Expired Data after I selected to run the task during the maintenance window?

    A: This status is only a notification and does not affect your instance's services. The data purge will not begin until the specified maintenance window.

  • Q: Why are the FLUSHALL and FLUSHDB commands disabled in Data Management (DMS)?

    A: The FLUSHDB and FLUSHALL commands are disabled in DMS because they are high-risk. To run these commands, use the Tair (Redis OSS-compatible) console as described in this topic or a client such as redis-cli.