Problem restoring domoticz.db

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
redfirebrooks
Posts: 19
Joined: Sunday 07 January 2018 16:36
Target OS: Raspberry Pi
Domoticz version:
Contact:

Problem restoring domoticz.db

Post by redfirebrooks » Thursday 21 June 2018 19:03

Version: 3.8153
Platform: RPI 3 B+
Plugin/Hardware: RFLINK GATEWAY USB, IKEA TRADFRI, MILIGHT

Hello,
I had some problems with light switches not showing correctly on the favourites tab. I tried to restore the domoticz.db to a previous version using this tutorial (in french but you should understand the commands) : https://easydomoticz.com/domoticz-backup-restaurations/

Now I have this error messages in the logs :

Code: Select all

2018-06-20 23:38:54.519 Incoming connection from: 127.0.0.1
2018-06-20 23:38:54.530 Error: SQL Query("SELECT nValue, sValue FROM Preferences WHERE (Key='HideDisabledHardwareSensors')") : database disk image is malformed
2018-06-20 23:38:54.538 Error: SQL Query("SELECT nValue, sValue FROM Preferences WHERE (Key='SensorTimeout')") : database disk image is malformed
2018-06-20 23:38:54.547 Error: SQL Query("SELECT ID, Name, Enabled, Type FROM Hardware") : database disk image is malformed
2018-06-20 23:38:54.555 Error: SQL Query("SELECT ID FROM Plans WHERE (Name=='$Hidden Devices')") : database disk image is malformed
2018-06-20 23:38:54.564 Error: SQL Query("SELECT A.ID, A.DeviceID, A.Unit, A.Name, A.Used,A.Type, A.SubType, A.SignalLevel, A.BatteryLevel, A.nValue, A.sValue, A.LastUpdate, A.Favorite, A.SwitchType, A.HardwareID, A.AddjValue, A.AddjMulti, A.AddjValue2, A.AddjMulti2, A.LastLevel, A.CustomImage, A.StrParam1, A.StrParam2, A.Protected, IFNULL(B.XOffset,0), IFNULL(B.YOffset,0), IFNULL(B.PlanID,0), A.Description, A.Options FROM DeviceStatus as A LEFT OUTER JOIN DeviceToPlansMap as B ON (B.DeviceRowID==a.ID) AND (B.DevSceneType==0) ORDER BY A.[Order],A.Name ASC") : database disk image is malformed
2018-06-20 23:39:00.433 Error: SQL Query("SELECT ID FROM Timers WHERE (Type == 5 AND ((Date < '2018-06-20') OR (Date == '2018-06-20' AND Time < '23:39')))") : database disk image is malformed
2018-06-20 23:39:00.441 Error: SQL Query("SELECT ID FROM SceneTimers WHERE (Type == 5 AND ((Date < '2018-06-20') OR (Date == '2018-06-20' AND Time < '23:39')))") : database disk image is malformed
2018-06-20 23:39:48.334 Error: SQL Query("DELETE FROM UserSessions WHERE ExpirationDate < datetime('now', 'localtime')") : database disk image is malformed
2018-06-20 23:39:48.379 Error: SQL Query("DELETE FROM UserSessions WHERE ExpirationDate < datetime('now', 'localtime')") : database disk image is malformed
2018-06-20 23:39:49.690 Error: SQL Query("SELECT nValue, sValue FROM Preferences WHERE (Key='HideDisabledHardwareSensors')") : database disk image is malformed
2018-06-20 23:39:49.699 Error: SQL Query("SELECT nValue, sValue FROM Preferences WHERE (Key='SensorTimeout')") : database disk image is malformed
2018-06-20 23:39:49.707 Error: SQL Query("SELECT ID, Name, Enabled, Type FROM Hardware") : database disk image is malformed
2018-06-20 23:39:49.715 Error: SQL Query("SELECT ID FROM Plans WHERE (Name=='$Hidden Devices')") : database disk image is malformed
I tried different backups but I am still facing the issue. Could someone help me please to solve it ?

SweetPants
Posts: 2250
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V4.9999
Location: The Netherlands
Contact:

Re: Problem restoring domoticz.db

Post by SweetPants » Thursday 21 June 2018 19:38

It is dangerous restoring other (older) databases as the database may be different. But it looks like you have another problem like a broken SD card.
Ubuntu 16.04.3 LTS, Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.2.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (from source)

redfirebrooks
Posts: 19
Joined: Sunday 07 January 2018 16:36
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Problem restoring domoticz.db

Post by redfirebrooks » Thursday 21 June 2018 21:06

it was my biggest fear...
guess I have to reinstall everything from scratch now :(

Post Reply

Who is online

Users browsing this forum: Ascari and 7 guests