Hi,
my influxdb is pretty large as I did not have an include/exclude policy for about 6 months. Now I have implemented include/exclude rules (for recorder and influx database) and I now want to clean up my influxdb.
The influxdb has 1500 data rows, of which I want to keep app. 500 and delete 1000. I can manually copy/paste 1000 delete commands into my chronograf query field, but that would be a lot of work. I have the commands for all rows to be deleted prepared in a txt file as follows:
USE "home_assistant"; DELETE FROM "%" WHERE "entity_id" = '0x00158d000ad9253d_battery'
USE "home_assistant"; DELETE FROM "%" WHERE "entity_id" = '0x00158d000ad92578_battery'
USE "home_assistant"; DELETE FROM "%" WHERE "entity_id" = '0x60b647fffe5b13fa_battery'
USE "home_assistant"; DELETE FROM "%" WHERE "entity_id" = '0xa4c1386dad45d415_battery'
So is there an option or other way to automate this process and use a script or similar and save all these copy/paste process? Thanks in advance!