Manual Downsampling Influx 1.8

Hello everybody.
Currently I have 3 years of storage of process measurements every 1 second, today I find myself with a 50Gb DB. I have created a CQ to downsampling in real time every 5sec and store it in another metric, but I find myself in the need to manually downsampling of the data already stored. I understand that it must be something normal but I have not found information about it. Could you help me?

Thanks and sorry for my English

Hello @layoroa,
Unfortunately there isn’t a way to downsample historical data with a continuous query. It sounds like you want to do bulk downsampling?
You could query the data in batches (to minimize the query size) and aggregate the output and write it back to InfluxDB with a client library.
What interval are you looking to aggregate the data at?

Of course, I understand that it is not possible with a CQ, so my need is to do a massive downsampling of the entire measurement and store it in a new retention policy. Could you help me with some documentation?

Hello @layoroa,
Sure. What is the client library that you want to use? What type of downsampling do you want to? Aggregate the one second data to… a monthly average? daily? What are you thinking?