Page 1 of 1
Switching between stable and beta
Posted: Friday 05 February 2016 7:02
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
Re: Switching between stable and beta
Posted: Friday 05 February 2016 13:37
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.
Re: Switching between stable and beta
Posted: Friday 05 February 2016 15:08
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 !!
Re: Switching between stable and beta
Posted: Friday 05 February 2016 18:43
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.
Re: Switching between stable and beta
Posted: Friday 05 February 2016 20:08
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
Re: Switching between stable and beta
Posted: Friday 05 February 2016 20:17
by nayr
It'll be a nice sunday evening, just as long as we dont choke in the first 10s this year
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?)
Re: Switching between stable and beta
Posted: Friday 05 February 2016 20:27
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

Re: Switching between stable and beta
Posted: Friday 05 February 2016 20:30
by nayr
lol no im a poor Chieftan.. no superbowls for us with the Broncos always beating us down.