I have a 200 GB hosted Influx DB, of which one of the measurements needs to be retained longer, so I need to copy it to another retention policy. I already changed my application to do two HTTP posts, the second one containing only the measurement for the longer retention policy. Now, I need to copy the existing data.
After some Googling, I found this:
select * into "fouryears"."51" from "autogen"."51" group by *;
I tested this on a dev DB and seems to work.
The live database contains 1.5 U.S. billion (1529039108) points in “51”. I’m a bit reluctant to run that query, also because I never seem to able to abort running queries.
Is this indeed the best way to go about it?