openhab-distro icon indicating copy to clipboard operation
openhab-distro copied to clipboard

Restore of config backup (zip file) at setup fails

Open knutt opened this issue 1 year ago • 3 comments

Platform information: Hardware: RP3B+ OS: Raspbian Java Runtime Environment: openJDK 11 openHAB version: 3.4.4 Trying to move configuration from Windows to my new Raspberry Pi, using openhabian. Saved Windows-based configuration to a backup file which I renamed to initial.zip and dropped in the \boot folder of the SD card. Edited the openhabian.conf file to import the backup file. So far so good.

Setup of openhabian went smooth, except from the import of the config backup. Log message:

2023-06-13_13:09:55_CEST [openHABian] Choosing openHAB backup zipfile to restore from... 
2023-06-13_13:09:55_CEST [openHABian] Restoring openHAB backup... yes: standard output: Broken pipe
FAILED (restore)

I tried menu option 04, which lets me select backup file and location (default is /boot/initial.zip). Here is (the interesting part of) the log:

Using '/etc/openhab' as conf folder...
Using '/var/lib/openhab' as userdata folder...
Making Temporary Directory
Extracting zip file to temporary folder.
warning:  /boot/initial.zip appears to use backslashes as path separators
Unable to unzip /boot/initial.zip, Aborting...
+ return 1
+ echo 'FAILED (restore)'
FAILED (restore)

Unzipping the file manually issues the same warning, but it does not fail. It may be that the openhab-cli script aborts due to the warning. It would be better to ignore this warning as the backlashes do not represent a problem.

Update: The command openhab-cli restore initial.zip also aborts. Excactly same message as the log from menu 04.

knutt avatar Jun 14 '23 12:06 knutt

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/restore-of-config-backup-zip-file-at-setup-fails/147244/5

openhab-bot avatar Jun 14 '23 12:06 openhab-bot

So you're attempting to restore a Windoze backup zipfile to a Linux machine. I don't think that's designed to work and you would need to figure out yourself what zip tool converter option you would need to use to have it restore properly. @BClark09 wdyt?

mstormi avatar Aug 06 '23 15:08 mstormi

It was the intention to have this at least try to work. Of course, configurations for things like COM ports would need to change after the restore. I'll have a look at this and see if the script can ignore the specific error as @knutt suggests.

BClark09 avatar Aug 16 '23 10:08 BClark09