content/enterprise_influxdb/v1/tools/influxd-ctl/truncate-shards.md
The influxd-ctl truncate-shards command truncates all shards that are currently
being written to (also known as "hot" shards) and creates new shards to write
new data to.
[!Caution]
Overlapping shards with forecast and future data
Running
truncate-shardson shards containing future timestamps can create overlapping shards with duplicate data points.
influxd-ctl truncate-shards [flags]
| Flag | Description |
|---|---|
-delay | Duration from now to truncate shards (default is 1m0s) |
{{% caption %}}
Also see influxd-ctl global flags.
{{% /caption %}}
influxd-ctl truncate-shards -delay 3m
[!Important] If you need to rebalance shards that contain future data, contact InfluxData support for assistance.
When you write data points with timestamps in the future (for example, forecast data from machine learning models),
the truncate-shards command behaves differently and can cause data duplication issues.
For shards containing current data:
This works correctly because the meta nodes understand the boundaries and route queries appropriately.
For shards containing future timestamps: