I created a portable backup of collectd database and then deleted some data from there by using DELETE command to free some space. After some time I decided to restore the data I deleted so I restore data to collectd_bak database and from there with the following select:
SELECT * INTO collectd.autogen.cpu FROM collectd_bak.autogen.cpu WHERE time >= 26w
measurement by measurement I moved data from collectd_bak to collectd. Have to say that I’ve got two retention policies in both databases (autogen and aggregated). So for autogen I used WHERE clause with time and for aggregated retention policy I didn’t.
Everythig seemed going well but then, when I wanted to search some stuff with Grafana it shows me only data for Last 2days. When I try to search 7d and more it says no data. Also restored database collectd_bak has size around 5G and collectd after I moved databa has 13G. I think that Influx somehow changed the data with the SELECT or so…
SELECT mean("value") FROM "snmp_value" WHERE ("type_instance" = 'load_5min' AND "host" = 'host1') AND $timeFilter GROUP BY time($__interval)
If anyone ran into the same problem please help ))
Thank you in advance for any suggestions!!!