Daabase repair, no .recover command on SQLite3 Topic is solved

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
Patricen
Posts: 117
Joined: Tuesday 06 February 2018 18:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta rel
Contact:

Daabase repair, no .recover command on SQLite3

Post by Patricen »

Hello,

I'm trying to repair my database that has lots of records and became huge due to a specific plugin.

I then used the procedure https://www.domoticz.com/wiki/Troublesh ... database_2 but as soon as I try executing sqlite .restore command, no such command found...

Code: Select all

sqlite> .recover
Error: unknown command or invalid arguments:  "recover". Enter ".help" for help
Looks pretty surprising, I then tried ".help", and help shows there is indeed no . recover command.

I'm using
SQLite 3.27.2 2019-02-25 16:06:06 bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1
zlib version 1.2.11
gcc-8.3.0

Trying to upgrade and install says the last version is already installed "3.27.2-3+deb10u1"

I'm running Raspbian GNU/Linux 10 (buster) on a Raspberry Pi 3 Model B Rev 1.2

Any hint?

Thanks
Patricen
Posts: 117
Joined: Tuesday 06 February 2018 18:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta rel
Contact:

Re: Daabase repair, no .recover command on SQLite3

Post by Patricen »

Does anybody encounters this issue?
User avatar
waltervl
Posts: 5903
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Daabase repair, no .recover command on SQLite3

Post by waltervl »

.recover is available from SQLite v 3.29 So you need to update SQLite.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Patricen
Posts: 117
Joined: Tuesday 06 February 2018 18:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta rel
Contact:

Re: Daabase repair, no .recover command on SQLite3

Post by Patricen »

Thanks!

When trying to get update, system says I di have the last version, maybe it is necessary to upgrade rpi os too?
User avatar
waltervl
Posts: 5903
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Daabase repair, no .recover command on SQLite3

Post by waltervl »

It seems so as updating SQLite on Buster is not that easy.
Be aware that if you run python plugins you have to go to the beta version of Domoticz as Bullseye giving issues with python plugins on stable 2022.1
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Patricen
Posts: 117
Joined: Tuesday 06 February 2018 18:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta rel
Contact:

Re: Daabase repair, no .recover command on SQLite3

Post by Patricen »

Thanks!

I'll then wait for 2022.2 that should hopefully be available soon.
AndrePower
Posts: 7
Joined: Tuesday 11 July 2017 20:29
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Contact:

Re: Daabase repair, no .recover command on SQLite3

Post by AndrePower »

You can look at this: https://linuxhint.com/install-set-up-sq ... pberry-pi/, Method 2. That will give you the latest version if you first modify the URL for the wget command, look at https://sqlite.org/download.html for the correct URL (you need the tar.gz for "C source code as an amalgamation") currently version 3.39: https://sqlite.org/2022/sqlite-autoconf-3390400.tar.gz
solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Daabase repair, no .recover command on SQLite3

Post by solarboy »

This is becoming ridiculously tedious. At least put a warning in the wiki.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
waltervl
Posts: 5903
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Daabase repair, no .recover command on SQLite3

Post by waltervl »

solarboy wrote: Wednesday 03 January 2024 18:49 This is becoming ridiculously tedious. At least put a warning in the wiki.
What is "this"? And what wiki?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Daabase repair, no .recover command on SQLite3

Post by solarboy »

"This" being that the database recovery process (why am I even doing this anyway, I have 2 UPS's on my machine, so improper shutdown is not an issue) does not work on Buster as you cannot update Sqlite to a version with the .recover command, as described in the "wiki" here: https://www.domoticz.com/wiki/Troublesh ... database_2 and mentioned in the first comment in this post (see above).
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
waltervl
Posts: 5903
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Daabase repair, no .recover command on SQLite3

Post by waltervl »

Ok, sqlite3 version added to instruction
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest