Database rocovery

I had a power cut.
Now my gateway show only blank blue page.
In logs I found: [Error: SQLITE_CORRUPT: database disk image is malformed] errno: 11, code: ‘SQLITE_CORRUPT’.
Can I somehow recover / repair database?

Shut down the GW and copy the database file from your backups and restart…

Didn’t make any backups did you :shushing_face:

Google may be your friend:{"cdrexp"%3A"b"%2C"artexp"%3A"b"%2C"prodexp"%3A"b"%2C"prdsdexp"%3A"c"%2C"biaexp"%3A"b"%2C"msvrtexp"%3A"b"%2C"bltexp"%3A"b"%2C"videxp"%3A"a"}

From the google search:
sqlite3 mydata.db “.dump” | sqlite3 new.db

Not sure how the GW works if/when you need to remove the previous database. Someone will comment I’m sure. Sigh, worst case is you will need to rebuild your configuration.


Yesterday, I just made my yearly full disk image backups of my 6 home computers and also my WebThing RPI’s SD and USB stick onto a portable 2T disk yesterday. Tomorrow, it’s going offiste to a relative’s house in case mine burns.

hope it won’t. :fire_engine: