# Event Replay


RudderStack's **Event Replay** feature lets you back up your event data and replay it in case of any failures. You can leverage this feature in the following scenarios:

- Replay failed events from a particular date to a destination, maybe due to some misconfiguration.
- Replay all events for a particular source, from a particular date, to a new event stream or warehouse destination.

{{< info >}}
**Feature support by plan**

- **Free** plan users cannot replay events.
- **Growth** plan users can replay events from up to **7 days** depending on their [event data retention options](#event-data-retention-options).
- **Enterprise** plan users can replay events from up to **30 days** depending on their [event data retention options](#event-data-retention-options).
{{< /info >}}

## Supported event types for replay

{{< warning >}}
RudderStack **does not support** replaying data from Reverse ETL sources.
{{< /warning >}}

RudderStack can store the following types of event data and replay it to the specified destinations:

### Raw events

RudderStack stores the raw events captured through various sources in batches of 100,000 events.

Note the following:

- **Upload frequency**: The upload frequency is 100,000 events or 5 minutes (whichever is earlier) for each source.
- **File format**: RudderStack stores the events in newline-separated gzipped JSON format.

### Delivery failures

RudderStack stores only the metadata of the delivery failures in its own S3 storage, approximately every 30 seconds.

RudderStack **does not store** any event payloads in case of delivery failures, as the payloads are already stored during archival.

## Event data retention options

{{< info >}}
Event data retention options are available in the [Growth](https://www.rudderstack.com/pricing/) and [Enterprise](https://www.rudderstack.com/enterprise-quote/) plans. 

Configure them in **Settings** > **Workspace** > **Data Management**. See [Data Management]({{< ref "dashboard-guides/data-management.md" >}}) for details.
{{< /info >}}

RudderStack offers the following [event data retention options]({{< ref "dashboard-guides/data-management.md#event-data-retention-options" >}}) for event replay:

| Data retention option | <div style="width: 350px;">Description</div> | Recommended for replay? |
| :---- | :---- | :---- |
| Do not store event data | RudderStack does not store any event data and hence it cannot be replayed. | <i class="fa-solid fa-circle-xmark fa-xl" style="color: #2E2E2E;"></i> |
| [Store in your own cloud storage]({{< ref "dashboard-guides/data-management.md#2-store-event-data-in-your-own-cloud-storage-recommended" >}}) | Event data is stored in your object storage. RudderStack currently supports Amazon S3, Google Cloud Storage, Azure Blob Storage, and MinIO as the object storage options. | <i class="fa-solid fa-circle-check fa-xl" style="color: #2F965D;"></i> |
| RudderStack 7-day cloud storage | This is the **default** setting on Growth and Enterprise plans — RudderStack stores event data on a rolling 7-day basis to prevent data loss if a rare incident occurs. | <i class="fa-solid fa-circle-check fa-xl" style="color: #2F965D;"></i> |
| RudderStack 30-day cloud storage | RudderStack stores the event data in its S3 bucket on a rolling 30-day basis, that is, RudderStack deletes the data 30 days after it was stored. Available in the [Enterprise](https://www.rudderstack.com/enterprise-quote/) plan only. | <i class="fa-solid fa-circle-check fa-xl" style="color: #2F965D;"></i> |

## Object storage setup

If you choose to set up your own object storage for backing up and replaying the events, follow the steps below depending on your cloud provider:

{{< tabs tabTotal="4" >}}

{{% tab tabName="Amazon S3" %}}
{{< warning >}}
The S3 setup for event backup and replay is different to [setting up Amazon S3 as a destination]({{< ref "destinations/streaming-destinations/amazon-s3.md" >}}).
{{< /warning >}}

1. Create your [object storage bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-bucket.html).
2. Configure the relevant [permissions for your bucket]({{< ref "user-guides/administrators-guide/bucket-configuration-settings.md#permissions-for-amazon-s3" >}}).
3. Connect your storage provider in the RudderStack dashboard. See [Store event data in your own cloud storage]({{< ref "dashboard-guides/data-management.md#2-store-event-data-in-your-own-cloud-storage-recommended" >}}) for details.
{{% /tab %}}
{{% tab tabName="Google Cloud Storage" %}}
1. Create your [object storage bucket](https://cloud.google.com/storage/docs/creating-buckets).
2. Configure the relevant [permissions for your bucket]({{< ref "user-guides/administrators-guide/bucket-configuration-settings.md#permissions-for-gcs" >}}).
3. Connect your storage provider in the RudderStack dashboard. See [Store event data in your own cloud storage]({{< ref "dashboard-guides/data-management.md#2-store-event-data-in-your-own-cloud-storage-recommended" >}}) for details.
{{% /tab %}}
{{% tab tabName="Azure Blob Storage" %}}
1. Login to the [Azure portal](https://portal.azure.com/) and create a [storage account](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal).
2. Click  **Containers** under **Blob service** and create a new container.
3. Connect your storage provider in the RudderStack dashboard. See [Store event data in your own cloud storage]({{< ref "dashboard-guides/data-management.md#2-store-event-data-in-your-own-cloud-storage-recommended" >}}) for details.
{{% /tab %}}
{{% tab tabName="MinIO" %}}
1. Log in to your MinIO service and [set up your bucket]({{< ref "destinations/streaming-destinations/minio.md#setting-up-minio" >}}).
2. Connect your storage provider in the RudderStack dashboard. See [Store event data in your own cloud storage]({{< ref "dashboard-guides/data-management.md#2-store-event-data-in-your-own-cloud-storage-recommended" >}}) for details.
{{% /tab %}}
{{< /tabs >}}

## Event ordering behavior

RudderStack processes replayed events in the same order they were originally received at the source.

{{< warning >}}
**Important consideration**

While RudderStack processes events in their original order, destinations may overwrite newer data with older replayed data, depending on how each destination handles events. Consider this behavior when replaying your events to avoid unintended data overwrites.
{{< /warning >}}

## How can I replay my events?

Depending on how you store your event data (**RudderStack-hosted storage** or your **own object storage**), contact [RudderStack Support](mailto:support@rudderstack.com) to safely replay your events and avoid any unfavorable circumstances.

<br />
