Database reset due to huge data gap in sensor data....

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
kimhav
Posts: 154
Joined: Tuesday 01 October 2013 8:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Sweden
Contact:

Database reset due to huge data gap in sensor data....

Post by kimhav »

Are there any quick way of performing a quick and easy reset of the database? Asking since I've noticed that over the last month when running Domoticz on a Rpi3 it hasn't for what ever reason not stored the values for any sensor at all and therefor I got a huge gap in the data now and for the sake of it I just want to make clean wipe of the database but keeping the devices.

Why Domoticz managed to generate a huge gap in the data is another story and currently I don't know why and I've never in the past have had such problem. Only difference is that I in the past ran on a proper server and now in the Rpi3 so I guess that it's usage of Pi3 and SD as storage which might be the cause here. But, open for suggestion on how to avoid this again.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Database reset due to huge data gap in sensor data....

Post by waaren »

kimhav wrote: Monday 30 July 2018 17:24 Are there any quick way of performing a quick and easy reset of the database? Asking since I've noticed that over the last month when running Domoticz on a Rpi3 it hasn't for what ever reason not stored the values for any sensor at all and therefor I got a huge gap in the data now and for the sake of it I just want to make clean wipe of the database but keeping the devices.

Why Domoticz managed to generate a huge gap in the data is another story and currently I don't know why and I've never in the past have had such problem. Only difference is that I in the past ran on a proper server and now in the Rpi3 so I guess that it's usage of Pi3 and SD as storage which might be the cause here. But, open for suggestion on how to avoid this again.
the history from device, scenes and sensor date is stored in many different tables in the domoticz.db
Spoiler: show
Fan
Fan_Calendar
LightingLog
Meter
Meter_Calendar
MultiMeter
MultiMeter_Calendar
Percentage
Percentage_Calendar
Rain
Rain_Calendar
SceneLog
Temperature
Temperature_Calendar
UV
UV_Calendar
Wind
Wind_Calendar
you could make two copies of your domoticz.db and delete all rows from these tables on one copy. Stop domoticz and copy the modified database over the current domoticz.db. If everything works OK, you are where you want te be. If not copy back the second copy.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest