Page 1 of 1
domoticz.db corrupt
Posted: Monday 17 August 2020 1:34
by Ptje
Hello,
Can somebody help my, to repair my domoticz.db ? I did try the solutions with sqlite but it result in a empty .db file.I don't know what I'm doing wrong.
Greetings,
Peter
Re: domoticz.db corrupt
Posted: Monday 17 August 2020 7:38
by waaren
Ptje wrote: ↑Monday 17 August 2020 1:34
Can somebody help my, to repair my domoticz.db ? I did try the solutions with sqlite but it result in a empty .db file.I don't know what I'm doing wrong.
Can you describe in more detail what you did to repair the database?
Also send you a PM
Re: domoticz.db corrupt
Posted: Monday 17 August 2020 9:30
by Ptje
Hello Waaren,
You are my hero today. The repaired db you send me, works !!! Many thanks.
Greetings,
Peter
Re: domoticz.db corrupt
Posted: Monday 17 August 2020 9:49
by waaren
Ptje wrote: ↑Monday 17 August 2020 9:30
The repaired db works.
Good that it works again!
Reason the recovery failed initially was that the dump process spotted some (or an) error(s) and added "ROLLBACK;" as last line in the dump file.
To force the recovery process to load the data anyway you need to change the last line of the dump file to "COMMIT;"
You can do that with an editor or with the sed program with below command
Code: Select all
sed -i '$ s/ROLLBACK;/COMMIT;/g' /tmp/myDump.sql # change last line in dump to prevent rollback
(assuming your dump file is in /tmp as mydump.sql)