---
title: kapacitor replay
description: The kapacitor replay command replays a task or query recording.
url: https://docs.influxdata.com/kapacitor/v1/reference/cli/kapacitor/replay/
estimated_tokens: 426
product: Kapacitor
version: v1
publisher: InfluxData
canonical: https://docs.influxdata.com/kapacitor/v1/reference/cli/kapacitor/replay/
date: '2023-10-03T10:49:57-06:00'
lastmod: '2023-10-03T10:49:57-06:00'
---

The `kapacitor replay` command replays a task or query recording.

The times of the data points will either be relative to `now` or, if the `-rec-time`flag is included, the exact times in the recording.
In either case, relative times between data points remain the same.

## Usage

```sh
kapacitor replay [flags]
```

## Flags

|    Flag     |                            Description                            |
|-------------|-------------------------------------------------------------------|
| `-no-wait`  |                   Run replay in the background                    |
|`-real-clock`|Replay data in real time, otherwise replay data as fast as possible|
| `-rec-time` |     Use times saved in the recording instead of present times     |
|`-recording` |                 Required: Recording ID to replay                  |
|`-replay-id` |        ID to assign to the replay (default is a random ID)        |
|   `-task`   |                              Task ID                              |

## Examples

##### Replay a recording

```sh
kapacitor replay \
  -recording 4e0f09c5-1426-4778-8f9b-c4a88f5c2b66 \
  -task cpu_alert
```

#### Related

* [kapacitor record](/kapacitor/v1/reference/cli/kapacitor/record/)
* [Kapacitor data sampling](/kapacitor/v1/working/cli_client/#data-sampling)
| Flag | Description |
| --- | --- |
| Flag | Description |
| -no-wait | Run replay in the background |
| -real-clock | Replay data in real time, otherwise replay data as fast as possible |
| -rec-time | Use times saved in the recording instead of present times |
| -recording | Required : Recording ID to replay |
| -replay-id | ID to assign to the replay (default is a random ID) |
| -task | Task ID |
