Switching between stable and beta

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

Moderator: leecollings

Post Reply
NietGiftig
Posts: 121
Joined: Sunday 11 October 2015 8:50
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.6224
Location: Holland
Contact:

Switching between stable and beta

Post by NietGiftig »

Can I switch from stable to beta and back without problems?
I assume the database structure can change when you go to beta from stable.
Are db changes backward compatible, or is it better to restore the old (stable) db if I go back?
I do not want to lose data when I have to switch back to stable after 2 weeks of tryout, then I would lose 2 weeks of data from power and weather readings.

I'm running on raspi2
RPI-2 + SSD / ESPEasy Sensors & Switches / Sonoff / RFLink / Action Switches / TP-Link switch / Node-Red / Reacticz
User avatar
nayr
Posts: 354
Joined: Tuesday 11 November 2014 18:42
Target OS: Linux
Domoticz version: github
Location: Denver, CO - USA
Contact:

Re: Switching between stable and beta

Post by nayr »

I have beta in ~/dev-domoticz and stable in ~/stable-domoticz and my scripts in ~/bin, which ever one i am working off of is symlinked to ~/domoticz and then ~/domoticz/scripts is symlinked back to ~/bin.. all fixed paths for scripts (init for example) point to ~/domoticz

databases seem to downgrade just fine, a newer version may extend the schema but the previous version does no schema validation so if you use the new database on an old version it works just fine and without issue.. at least it should.

I swap between versions all the time and never had much trouble.. I just keep a copy of the last working version so you can revert as soon as you experience a problem you cant fix.
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
NietGiftig
Posts: 121
Joined: Sunday 11 October 2015 8:50
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.6224
Location: Holland
Contact:

Re: Switching between stable and beta

Post by NietGiftig »

nayr wrote:I have beta in ~/dev-domoticz and stable in ~/stable-domoticz and my scripts in ~/bin, which ever one i am working off of is symlinked to ~/domoticz and then ~/domoticz/scripts is symlinked back to ~/bin.. all fixed paths for scripts (init for example) point to ~/domoticz
WOW, just have to read this a couple of times, the "Old Grey Substance" up here is getting old. :)
nayr wrote: databases seem to downgrade just fine, a newer version may extend the schema but the previous version does no schema validation so if you use the new database on an old version it works just fine and without issue.. at least it should.

I swap between versions all the time and never had much trouble.. I just keep a copy of the last working version so you can revert as soon as you experience a problem you cant fix.
Thanks !!
RPI-2 + SSD / ESPEasy Sensors & Switches / Sonoff / RFLink / Action Switches / TP-Link switch / Node-Red / Reacticz
User avatar
nayr
Posts: 354
Joined: Tuesday 11 November 2014 18:42
Target OS: Linux
Domoticz version: github
Location: Denver, CO - USA
Contact:

Re: Switching between stable and beta

Post by nayr »

sorry yeah that was a mouth full.. leme try to clarify for anyone finding this in a search

think of it like this:
~/dev-domoticz - Latest Dev version
~/stable-domoticz - Last version I was happy with and everything was copacetic.
~/bin - Copy of all my Domoticz scripts, including modified versions of restart_domoticz and update_domoticz.. I have this path in my PATH environment so its pretty nice for dumping all sorts of scripts into.. gets backed up automatically.

~/domoticz - Symlink to one of the above folders I am working out of, a simple unlink ~/domoticz; ln -s ~/dev-domoticz ~/domoticz would switch from stable to beta for example once I have everything setup.
~/domoticz/scripts - Symlink back to ~/bin (rm -Rf ~/domoticz/scripts; ln -s ~/bin ~/domoticz/scripts)

Anytime presented with a hardcoded path, for example startup scripts or device on/off scripts.. always provide ~/domoticz/ path that way you when you hot-swap versions out you dont have to update any paths.

If you have any custom templates or themes you might have to do something similar so you can link them between versions.

I work off github and not releases, so I kinda make my own releases when I have tested everything works and copy that folder to domoticz-stable, then every once and a while I will update my development branch, check out if anything new in intriguing enough to start re-testing everything from the start.. if something is broke I revert back and work on a fix... seems like the longer I go between updates the more there is to fix.
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
NietGiftig
Posts: 121
Joined: Sunday 11 October 2015 8:50
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.6224
Location: Holland
Contact:

Re: Switching between stable and beta

Post by NietGiftig »

nayr wrote:sorry yeah that was a mouth full.. leme try to clarify for anyone finding this in a search
......

if something is broke I revert back and work on a fix... seems like the longer I go between updates the more there is to fix.
Thanks for the comprehensive explanation.
Have a nice Sunday evening with the Broncos
Night time for me (Netherlands), but watching the game
RPI-2 + SSD / ESPEasy Sensors & Switches / Sonoff / RFLink / Action Switches / TP-Link switch / Node-Red / Reacticz
User avatar
nayr
Posts: 354
Joined: Tuesday 11 November 2014 18:42
Target OS: Linux
Domoticz version: github
Location: Denver, CO - USA
Contact:

Re: Switching between stable and beta

Post by nayr »

It'll be a nice sunday evening, just as long as we dont choke in the first 10s this year :lol:

local media has amnesia, they talk about last visit alot.. but they dont seem to recall what happened once the whistle was blown.

(I am not a native, my Loyalties are with a Rival team, but they are down and out so I can hop on the bandwagon, right?)
Last edited by nayr on Friday 05 February 2016 20:31, edited 1 time in total.
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
NietGiftig
Posts: 121
Joined: Sunday 11 October 2015 8:50
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.6224
Location: Holland
Contact:

Re: Switching between stable and beta

Post by NietGiftig »

nayr wrote:my Loyalties are with a Rival team, but they are down and out so I can hop on the bandwagon, right?)
Oh dear, I hope not the New England Patriots :D
RPI-2 + SSD / ESPEasy Sensors & Switches / Sonoff / RFLink / Action Switches / TP-Link switch / Node-Red / Reacticz
User avatar
nayr
Posts: 354
Joined: Tuesday 11 November 2014 18:42
Target OS: Linux
Domoticz version: github
Location: Denver, CO - USA
Contact:

Re: Switching between stable and beta

Post by nayr »

lol no im a poor Chieftan.. no superbowls for us with the Broncos always beating us down.
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest