Exporting data between retention policies with different shard durations


I’m copying data between 2 influxdb servers. It’s the same database name on source/destination servers but they have different shard durations (1w on the source and 1d on the destination).
The “copying” is done by running influx_inspect export on the source and influx -import on the destination. I noticed that the import actually altered the shard duration on the destination and even worse there are shards with different durations and overlapping windows. e.g.

id database retention_policy shard_group start_time           end_time             expiry_time          owners
-- -------- ---------------- ----------- ----------           --------             -----------          ------
15 test     autogen          15          2020-07-07T00:00:00Z 2020-07-08T00:00:00Z 2020-09-06T00:00:00Z 
4  test     autogen          4           2020-07-10T00:00:00Z 2020-07-11T00:00:00Z 2020-09-09T00:00:00Z 
2  test     autogen          2           2020-07-11T00:00:00Z 2020-07-12T00:00:00Z 2020-09-10T00:00:00Z 
22 test     autogen          22          2020-07-06T00:00:00Z 2020-07-13T00:00:00Z 2020-09-11T00:00:00Z 
19 test     autogen          19          2020-07-12T00:00:00Z 2020-07-13T00:00:00Z 2020-09-11T00:00:00Z 
30 test     autogen          30          2020-07-13T00:00:00Z 2020-07-20T00:00:00Z 2020-09-18T00:00:00Z

Now i’m guessing this is probably a use case that’s not supported. But how would influxdb deal with these shards? What is the behavior when an existing RP gets altered with a different shard duration? Say you shorten the shard duration from 1w to 1d during the week.


It turned out to be a daily scheduled ansible job that resets all the retention policies, which led to the messed up shards.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.