What happen if I change retention policy?

influxdata
schema
grafana
time-series
influxdb
#1

Hi everyone,

What happen if I change retention policy ?

e.g. I have data set that belong 2010-2018.
from 2010 till 2016 retention policy maintain every 5 minutes data points
if I change retention policy in 2017 till 2018 like this: retention policy maintain every 1 minutes data points. now I want to know what exactly happen:

1-How it will show on Grafana? (as I mention from 2010-2016 we have lower data points and in 2017-2018 these points increase.)

2-Influx create new measurement(s) to store these data or write them in same measurement?

Thanks,

#2

Hi @Indeed_1,

That’s not exactly how retention policies function. A retention policy governs how long data is stored in a given database. If you set a retention policy of 1 year, only data < 1year will be retained. It is not in any way related to the frequency of the datapoint.

In order to do what I think you’re asking about, you would want to downsample your data to a lower frequency – the 5 minute data points – and save those in a NEW database with a longer retention policy. You can reference this document for more information: https://docs.influxdata.com/influxdb/v1.7/guides/downsampling_and_retention/#sidebar

Best Regards,
dg

#3

It’s my fault ! :slight_smile:
replace word downsampling instead of retention policy!
So how it work?
Thanks

#4

Did you read the documentation linked above? Do you have specific questions from that documentation that you would like to post here?

Thanks,
dg