This topic describes how to set the period for which audit logs of earlier versions are retained. You can log on to the ApsaraDB for Redis console and set the retention period. Audit logs can be stored for 7 to 30 days.

Prerequisites

  • Either of the following instances is used: ApsaraDB for Redis instances of Community Edition and performance-enhanced instances of Enhanced Edition.
  • The engine version of the ApsaraDB for Redis instance is Redis 4.0 or later.
  • The ApsaraDB for Redis instance uses the latest minor version.
  • The audit log feature is enabled.
Note If your instance version does not allow you to query audit logs and must be upgraded before you can use the audit log feature, upgrade the major or minor version as needed. For more information, see Upgrade the minor version and Upgrade the major version.

Procedure

  1. Log on to the ApsaraDB for Redis console.
  2. On the top of the page, select the region where the instance is deployed.
  3. On the Instances page, click the Instance ID of the instance.
  4. The Instance Information page appears. In the left-side navigation pane, choose Logs > Audit Log.
  5. On the Audit Log page, click Config.Set the retention time for audit logs of an ApsaraDB for Redis instance
  6. In the Config Audit Log dialog box, adjust the Retention Days slider, and click Confirm.
    Warning Expired log entries are not retained.