All Products
Search
Document Center

ActionTrail:Store events for long-term retention

Last Updated:Jun 10, 2026

ActionTrail retains events for the past 90 days by default. To meet compliance requirements such as MLPS 2.0 (180+ days), create a trail and a data backfill task to store complete events in Simple Log Service (SLS). Otherwise, events older than 90 days cannot be retrieved.

Prerequisites

Background information

A trail delivers only events generated after its creation. To capture the full 90-day history, also create a data backfill task to deliver events from before the trail was created.

A data backfill task covers the period from 90 days before the current time to 5 minutes after the trail was activated. For example, if Trail A was created 40 days ago, the backfill task covers the 50-day period before Trail A was created.

Note
  • Data backfill tasks deliver events from single-account trails to SLS only.

  • Only one data backfill task can run at a time per Alibaba Cloud account.

Step 1: Create a single-account trail to SLS

  1. Log on to the ActionTrail console.

  2. In the left-side navigation pane, click Trails.

  3. In the top navigation bar, select the region for the trail.

    Note

    This region becomes the home region of the single-account trail.

  4. On the Trails page, click Create Trail.

  5. On the Create Trail page, configure the trail.

    • In the Basic Information section, set the trail name and the management event type.

      Note

      By default, the trail applies to all regions. We recommend that you set Management Event to All Events to capture all events from all regions. For more information about the parameters, see Create a single-account trail.

    • In the Event Delivery section, configure event delivery to SLS in the current account.

      Parameter

      Description

      Logstore Region

      The region of the SLS project.

      Project Name

      The name of the SLS project.

      Note

      Project names must be globally unique within Alibaba Cloud.

  6. Click Confirm.

Step 2: Create a data backfill task

  1. In the left-side navigation pane, click Backfill.

  2. In the top navigation bar, select the region for the data backfill task.

    Note

    This region must match the home region of the trail.

  3. On the Backfill page, click Create Task.

  4. On the Create Task page, select the trail.

    Note

    After you select a trail, the system automatically populates the region, project, and Logstore fields.

  5. Click Confirm.

    After the task is created, check its Delivery Status on the Backfill page to verify event delivery.

Step 3 (Optional): Query complete events

  1. In the left-side navigation pane, click Trails.

  2. In the top navigation bar, select the trail region.

  3. On the Trails page, find the target trail. In the Storage Service column, hover over SLS or SLS&OSS and click the name of the SLS Logstore.

  4. Click Last 15 Minutes and specify a time range for your query.

  5. Enter an SQL statement and click Search & Analyze to query the event details.

References