I want to elaborate on @chris4789 's answer.
When you create and/or discover a Thing, it’s given a Unique Identifier (UID). Bridges and Things that do not work through a Bridge will use a randomly generated string as the UID.
Before you create that Thing though, you can change that UID to anything you want, so long as it’s unique. I recommend using something meaningful, like “controller” for a zwave controller.
All the Thing that are under that Bridge will then include that Bridge’s UID as part of their UID.
Consequently, if you replace a Bridge Thing with a new Thing, if you use the same UID as the old Thing all the Things under the Bridge will have the same UIDs too. And because they have the same UIDs, the Links to the Items will all continue to work.
Since all Things except for the Bridge are autodiscovered, adding all the Things should be as simple as running a Scan and accepting the Things from the Inbox.
However, if you restore a backup from before you replaced the Thing and follow these steps you won’t have to do even that much.
- Delete the old Zwave controller Bridge Thing, taking note of the Thing UID.
- Manually create a new Zwave Bridge Thing. Before clicking “Create Thing”, make sure to modify the Thing ID to match the ID you recorded in 1.
That’s it. All your existing Zwave Things will now use this new Thing as their Bridge and all the Links to your Items will continue to work.
You cannot export managed Things to .things files. Similarly you cannot import a .things file to become managed Things.
There are some scripts here and there on the forum you might find that can do this using the REST API. But this is unnecessary.
As I described above, this is unnecessary. Just make sure your new Bridge has the same UID as the old one and everything will work.
If you fail to do that, it’s still not necessary as you can just scan for and rediscover all the Things again. If you do this though you will have to update the Links in your Items as the new Things will now have new UIDs.
If you don’t want to do even that, you can just stop OH and do a find an replace on the UIDs of your Zwave Things so they match the UID of the newly created Zwave controller thing. On a Zwave Thing, if the UID of the Controller is zwave:serial_zstick:blahblahblah
, a Zwave Thing’s UID will look like zwave:device:blahblahblah:node11
. You just need to make the “blahblahblah” parts match.