RETENTION is not working

HI Team,

As I have checked retention policy on influxDB, but on influxdb i can see last 6 months data on influx.

SHOW RETENTION POLICIES ON telegraf
name duration shardGroupDuration replicaN default


autogen 2016h0m0s 168h0m0s 1 true

name: telegraf
id database retention_policy shard_group start_time end_time expiry_time owners


569 telegraf autogen 569 2019-10-28T00:00:00Z 2019-11-04T00:00:00Z 2020-01-27T00:00:00Z
578 telegraf autogen 578 2019-11-04T00:00:00Z 2019-11-11T00:00:00Z 2020-02-03T00:00:00Z
587 telegraf autogen 587 2019-11-11T00:00:00Z 2019-11-18T00:00:00Z 2020-02-10T00:00:00Z
596 telegraf autogen 596 2019-11-18T00:00:00Z 2019-11-25T00:00:00Z 2020-02-17T00:00:00Z
605 telegraf autogen 605 2019-11-25T00:00:00Z 2019-12-02T00:00:00Z 2020-02-24T00:00:00Z
614 telegraf autogen 614 2019-12-02T00:00:00Z 2019-12-09T00:00:00Z 2020-03-02T00:00:00Z
623 telegraf autogen 623 2019-12-09T00:00:00Z 2019-12-16T00:00:00Z 2020-03-09T00:00:00Z
632 telegraf autogen 632 2019-12-16T00:00:00Z 2019-12-23T00:00:00Z 2020-03-16T00:00:00Z
641 telegraf autogen 641 2019-12-23T00:00:00Z 2019-12-30T00:00:00Z 2020-03-23T00:00:00Z
650 telegraf autogen 650 2019-12-30T00:00:00Z 2020-01-06T00:00:00Z 2020-03-30T00:00:00Z
659 telegraf autogen 659 2020-01-06T00:00:00Z 2020-01-13T00:00:00Z 2020-04-06T00:00:00Z
668 telegraf autogen 668 2020-01-13T00:00:00Z 2020-01-20T00:00:00Z 2020-04-13T00:00:00Z
677 telegraf autogen 677 2020-01-20T00:00:00Z 2020-01-27T00:00:00Z 2020-04-20T00:00:00Z

version :- influxdb-1.7.9-1.x86_64

How can I configure RETENTION policy for 3 months ?

Hi

alter retention policy "autogen" on "yourdatabase" duration 90d replication 1 default

That should do it, database and retention policy management

Thanks for replying.

As I can see current retention policy is deployed for 84 days (2016h), but I can see last 6 months data in influxDB.

show retention policies on “telegraf”
name duration shardGroupDuration replicaN default


autogen 2016h0m0s 168h0m0s 1 true

So is there any other configuration required for this?

Hi, no that should do it i think. If the RP is 84 days you shouldn’t have any data older than that. Have you tried making a new RP and assigning it to your database?