Best method to migrate OH3 Windows <-> Linux

Currently operating 3.1.0 on Windows. Also have 3.1.0 on Linux (OpenHabian). What is the preferred way to migrate the working data from Windows up to Linux? It seems like copying userdata and conf entirely might be a little too much and break things? Is there a method known to work nicely?

I think the recommended approach is to run backup.bat on Windows and then restore the zip on Linux using openhab-cli restore.

However, watch the logs as there might be some settings that point to absolute file system paths which will not exist on the Linux side. Those should be few though and will most likely be in the userdata/etc/ folders.

I took a stab at that last night. Moved my windows backup zip down to the raspberry pi and tried to restore. The restore bombed out with an error about backslashes. Google revealed someone else having this happen due to a bug in the way Windows PowerShell creates zip files. I unzipped the backup file and re-zipped it with with WinRAR. The restore script then worked perfectly.

2 Likes

Just in case someone else is haveing a similar issue, for me it helped to run the backup.bat as admin. I still had to do the WinRAR zipping and unzipping though.