Upgrading database

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
gemas
Posts: 7
Joined: Saturday 07 October 2017 14:07
Target OS: -
Domoticz version:
Contact:

Upgrading database

Post by gemas »

Hello,

I'm migrating my domoticz instance to a new raspberry pi.
This runs the latest raspberry os and the latest version of domoticz.
On my old instance I'm running an older version of domoticz (4.10717).

But when I compare an empty database of version 2020.2 to the old one (V4.10717) I see some schema changes.
I copied the domoticz.db from the old instance to the new one.
After restarting the new domoticz instance, the migrated database doesn't get upgraded to the latest schema.

Do I need to do this manually with a command?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Upgrading database

Post by waaren »

gemas wrote: Tuesday 12 January 2021 10:14 After restarting the new domoticz instance, the migrated database doesn't get upgraded to the latest schema.
If you start domoticz with a previous version of the database it will be automatically converted to the version aligned with he domoticz build number. . No manual actions are needed.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
gerardvs
Posts: 81
Joined: Sunday 04 January 2015 0:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest-1
Location: /dev/null
Contact:

Re: Upgrading database

Post by gerardvs »

First of all I have no intention to hijack this thread but the question I have is almost the same.
Does your answer also apply to version 3.6675?
I'm happy to say that I have version 3.6675 running continuously from feb 2017 with only a handful of reboots in the past 4 years. Unfortunately of luckily... I have to upgrade to a more recent version mainly because I want to make more use of dzVents.
Again sorry to hijack this tread but want to know if migrating from 3.6675 to the current version is doable.

--Gerard
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Upgrading database

Post by waaren »

gerardvs wrote: Monday 01 February 2021 17:45 Does your answer also apply to version 3.6675?
Yes that should work the same.

As always; please make sure you have a recent and tested backup !
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
gerardvs
Posts: 81
Joined: Sunday 04 January 2015 0:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest-1
Location: /dev/null
Contact:

Re: Upgrading database

Post by gerardvs »

waaren wrote: Monday 01 February 2021 18:04 As always; please make sure you have a recent and tested backup !
Sure, that is automated once a day. I'm a bit afraid of messing up my 8 somfy devices but will take the chance.

Thanks again for your help!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest