I don't think that really solves it. You will hit the problem again eventually, you would simply be delaying things. Better to get this sorted now. Create a continuous query to agreggate your detailed measurement data into a summary measurement. e.g.
CREATE CONTINUOUS QUERY cq_60min
ON domotica BEGIN
SELECT mean(value) AS value, max(value),
min(value), max(value) - min(value) AS range
INTO domotica.one_week.env_daily
FROM domotica.twenty_four_hours.environment
GROUP BY location, type, time(1h)
END
and then set a retention policy on the detailed data to only retain a reasonable amount (e.g. a month or a week or whatever). e.g. ALTER RETENTION POLICY "autogen" ON "telegraf" DEFAULT DURATION 768h
.
I can't remember whether I even bothered to migrate to be honest, I might not have done. I would think you could probably export the data and then re-import.
Some more details on using InfluxDB here: Need more detailed information on influxdb - General - Node-RED Forum (nodered.org)