Restoring OpenLuup
-
I thought I would test and migrate my OpenLuup installation from my current old i3 Ubuntu server to a new Raspberry Pi 4.
I have set up the new Pi with a fresh install of openLuup and it works as it should.
As I have understood it I should install all the plugins I have on my old installation and then restore a backup file from my old installation onto the new server. Is this correct or should I do some more steps before migrating? When I see that everything is working the plan is to swap the IP, but initially the new server will have another IP.
When I tried to test the resore procedure on the new server from a backup file of the new server I got an error and the restore script hangs.
After reboot OpenLuup is back.What I did was type:
./openLuup_reload backup/backup.openLuup-88800000-2021-04-12.lzap
in the Terminal from inside cmh-ludl ( I found this procedure in an old thread).When doing this I get the following error message:
rm: can not remove '/www/altui/altui*': The file of catalogue does not exist
(free-hand translated from Swedish)@akbooer am I missing something here?
-
The 'cannot remove' error message comes from AltUI, and, in fact, is always there at startup... there's nothing I can do to remove it, but it's not an error condition.
The script only hangs because the openLuup process is running. If you had terminated it with an '&' then it would have run ina detached process. If you have exited openLuup with a
data_request?id=exit
it would also have completed. So it sounds like nothing is wrong at all, except poor documentation, for which I apologise.AK
-
The 'cannot remove' error message comes from AltUI, and, in fact, is always there at startup... there's nothing I can do to remove it, but it's not an error condition.
The script only hangs because the openLuup process is running. If you had terminated it with an '&' then it would have run ina detached process. If you have exited openLuup with a
data_request?id=exit
it would also have completed. So it sounds like nothing is wrong at all, except poor documentation, for which I apologise.AK
-
@akbooer that almost went well.
It seems as if the backup file has been loaded, it seemed to take a while.
After letting the Pi be for some 15 minutes, I rebooted and can access the Console. It seems as if everything is there. I tested controlling a device and that also works.
However I cannot get in with AltUI. I only get to "Waiting initial data".
I have also tested
http://myIP:3480/data_request?id=lr_ALTUI_Handler&command=home&lang=en#
(and lang=sv) but that does not help.Any idea what that could be?
-
@akbooer that almost went well.
It seems as if the backup file has been loaded, it seemed to take a while.
After letting the Pi be for some 15 minutes, I rebooted and can access the Console. It seems as if everything is there. I tested controlling a device and that also works.
However I cannot get in with AltUI. I only get to "Waiting initial data".
I have also tested
http://myIP:3480/data_request?id=lr_ALTUI_Handler&command=home&lang=en#
(and lang=sv) but that does not help.Any idea what that could be?
-
@archers If your browser is set to Swedish, try changing it to English. I think I had similar issues on my first install.
-
This is curious. I have just gone through exactly the same procedure myself as I migrated from a BreagleBone Black to a Docker image for my main openLuup installations. I didn't see this problem.
However, I do occassionaly see this during the course of my development on my iMac. Ususally, waiting a bit resolves the issue. But I've never pinned down the root cause.
Does the log show anytinh in the AltUI startup which might cause concern? The trick here is to appreciate that AltUI starts up in two phases, once early on in the initial system start and then a delayed part, perhaps 20 seconds later, or so. So there are two parts of the main log which are of interest.
-
This is curious. I have just gone through exactly the same procedure myself as I migrated from a BreagleBone Black to a Docker image for my main openLuup installations. I didn't see this problem.
However, I do occassionaly see this during the course of my development on my iMac. Ususally, waiting a bit resolves the issue. But I've never pinned down the root cause.
Does the log show anytinh in the AltUI startup which might cause concern? The trick here is to appreciate that AltUI starts up in two phases, once early on in the initial system start and then a delayed part, perhaps 20 seconds later, or so. So there are two parts of the main log which are of interest.
@akbooer no I cannot find anything particular. On the other hand I am not sure what I am looking for so I may have missed it.
Strange error for sure.Edit: I think I will make a clean reinstall of OpenLuup on the Pi, that should be quite quick.
What is the best way to do that? To delete the cmh-ludl folder and then re-install? -
@akbooer the system is bridged to two Veras and one Zway. In fact I do not use the Veras anymore, so I may do a clean reinstall on the Pi and then bridge it to Zway. That should clear our any old strange dependencies.
Hopefully that would also make Mqtt work without crashing. -
@akbooer the system is bridged to two Veras and one Zway. In fact I do not use the Veras anymore, so I may do a clean reinstall on the Pi and then bridge it to Zway. That should clear our any old strange dependencies.
Hopefully that would also make Mqtt work without crashing.Answering myself; deleting the cmh-ludl folder and reinstalling OpenLuup worked just fine. After the clean install the AltUi problem disappeared.
Strange and bit worrysome that AltUi did not work when restoring a backup. I may try this again later on, always good to verify that backups work.
-
Good news. I’ve no idea what may have been wrong, but you fixed it. Sorry I was unable to provide any useful guidance, but at least I have something to offer anyone with this problem in the future.
I’m looking into a much more automatic way of restoring backups.
-
Good news. I’ve no idea what may have been wrong, but you fixed it. Sorry I was unable to provide any useful guidance, but at least I have something to offer anyone with this problem in the future.
I’m looking into a much more automatic way of restoring backups.
@akbooer that sounds promising. Easy backup and restore is crucial. The AltUi "waiting for initial data" problem is a bit concerning.
Something else I noticed that could be worth considering as a future improvement is to include the most common device files in the install somehow.
I solved this by setting up my old Veras, getting the files via the bridges and then disconnecting them. Would be a bit harder without a Vera though. Something I assume will be more common as times goes and more and more Veras get retired.
-
@akbooer that sounds promising. Easy backup and restore is crucial. The AltUi "waiting for initial data" problem is a bit concerning.
Something else I noticed that could be worth considering as a future improvement is to include the most common device files in the install somehow.
I solved this by setting up my old Veras, getting the files via the bridges and then disconnecting them. Would be a bit harder without a Vera though. Something I assume will be more common as times goes and more and more Veras get retired.
@archers said in Restoring OpenLuup:
include the most common device files in the install
There are, in fact, a couple there, but you will not see them as separate files. Again, I have some ideas about this... openLuup is able to construct XML files on the fly from much more compact internal representations.
-
If there is some reason the initial http response to pull the full controller config for ALTUI takes longer than the configured in the ALTUI ControlTimeout mS you will see this. I set this variable to 9000 and that is sufficient, even via a pihole remote connection. Setting it too long I have seen it holding other openLuup/plugin http requests in case of a delay for what ever reason. So it looks like finding a balance for your setup a bit.
Cheers Rene