Copying items data for upgrade

I need to upgrade to 1.0 and also upgrade my PI to a PI4. How can I extract the connected items and import into the new installation? I read somewhere to copy the “config” directory but my config directory has only 2 javascript files. Where is configuration and device data stored?

Hi @dale1, user data is stored in /home/pi/.webthings on a Raspberry Pi.

Thanks, Ben. I don’t have a .webthings directory or file in /home/pi.
But I dug some more, figuring there would be some sort of datastore,
either a json, xml, or other file and even considered that there would
be a sqlite file. Sure enough, I found the sqlite file at
/home/pi/.mozilla-iot/config/db.sqlite3.

I still have work to do to test if I can copy that to a new install and
see if that will give me the desired results but at least I know now
where to start.

Dale

Sorry, I didn’t fully register what you’re trying to do. The .mozilla-iot/ directory was renamed to .webthings/ in the 1.0 update.

If you haven’t yet upgraded to 1.0 then I’m afraid you’re going to have some issues. When version 1.0 was released in December 2020 we migrated all existing users off Mozilla infrastructure onto a new update server (see this blog post for more information). Mozilla’s update server has since been shut down, which means there is no longer an automatic upgrade path from 0.x to 1.0.

It may be possible to convince your existing Raspberry Pi to upgrade by manually changing the URL of the update server to the new WebThings server URL https://api.webthings.io:8443/releases, but I’ve never tested that approach so I don’t know if it will work. The URL of the update server is set in the config file which should be in ~/mozilla-iot/gateway/config/default.js (You can see what the new version looks like here https://github.com/WebThingsIO/gateway/blob/master/config/default.js).

If you can I would clone the SD card before testing this, in case it goes wrong.

It may turn out easier for you to just start again with a fresh 1.0 installation :frowning:

Thanks, Ben. I don’t remember getting a notice but I have seen the change. I didn’t understand the change for upgrades, though. It will only take me a couple hours to start over so I think I’ll take that route and then work on how to backup and restore configuration and things in the new version.