Development system for upgrade?

As part of trying to upgrade from 2.3 to 2.5 (currently m2) I thought I’d take a copy of my machine and upgrade it ( see the comment in here about upgrading: Running openHAB 2 in Docker)

What’s the best way of doing this?

Obviously the copied system won’t have everything, it won’t have zwave etc.

But I also don’t want it populating my main influxdb. But the more changes I make to the config the more chances I have that it becomes a pointless exercise as I kill my working system (eg make a change for my 2.5 system to remove persistence…and that makes it’s way to the live system when I finally upgrade).

So can I do something like set the influx config, to be the openhab-prod db for live, and openhab-dev for the testing system - automatically…ie use some sort of variable for the system that’s picked up (meaning I don’t actually have to change the config file)…same goes for mqtt client ids.

It’s not possible. You will have to edit the config files.

Hmm how good are you on git? Yes all these files will be in a branch. But any ideas how I can not commit the changes influxdb.cfg and mqtt.cfg (the two I can think of off the top of my head)

That’s easy. Create a .gitignore file and list each of those files, each on their own line. Here is an example of my .gitignore for my full conf/userdata repo which excludes all sorts of things.

userdata/*
!userdata/etc
!userdata/jsondb
!userdata/config
!userdata/habot
!userdata/openhabcloud
!userdata/uuid
!userdata/zigbee
!userdata/zwave
userdata/jsondb/backup
userdata/backup
.Trash-1000
conf/html/hum.jpg
conf/html/light.jpg
conf/html/power.jpg
conf/html/temp.jpg
*py.class
*.swp

Note how I exclude all of userdata and then add back in certain folders.

Yeah I wanted something more than that…as I do want these files in git…so they need to be committed - but in the branch any changes to these files, I don’t want to merge them back to trunk…

I may have found a way:

Configure a merge driver that prioritises the trunk over the branch. Then add the specific files (mqtt.cfg, influxdb.cfg mqtt-eventbus.cfg at this stage) to the .gitattributes. That should mean in a merge, to trunk, that they’re ignored…hopefully. I’ll try it.