WinToolHAB - Windows Backup/Restore/Update Tool for OpenHAB

Tags: #<Tag:0x00007f617c695660> #<Tag:0x00007f617c6953e0> #<Tag:0x00007f617c695228>

Hello!

I’ve been using OpenHAB on Windows for a pretty long time, and, since updating OpenHAB in Windows isn’t straightforward, I’ve made a Windows application that should make Backup, Restore and Update operations easier. It makes full and configuration backups, restores previously created backups and updates OpenHAB using local or online update files. The update process is done by following steps of Windows OpenHAB update in the documentation.

Since I have only one OpenHAB installation, I haven’t been able to test the application thoroughly, nor in different environments, so, use at your own risk. I am not responsible for any damage that may arise from using this application.

Right now, application doesn’t have any icon, and, since I’m not sure if it’s allowed, I would like to ask @Kai (not sure if he’s the right person) if it’s OK to use OpenHAB icon for the application. If it is allowed, are there any OpenHAB icons to download, publicly available?

Finally, here are the links to a source and a precompiled binaries.

If you have any questions or suggestions, feel free to write them here, or open an issue on a github.

Best regards,
Davor

Hi Davor,

that sounds good for me. I will try it this weekend.

Thank you,
Joerg

1 Like

Hello!

I was wondering if anyone has tried an application? Since I have only one OpenHAB installation, I would really appreciate some feedback on usage in different environments.

Best regards,
Davor

Hi,

i tried the Backup. It works and looks good.

I have a few Questions / wishes.

  • Is it possible to check running process and start stop it or …
  • Better Backup for openfiles
  • external Logfile for every Backup
  • A Summery at the end of the Log (xxx files sucessful / xxx skiped / xxx failed)
  • Resize the Loglist when i resize the window. Better for searching the long list.

The keep # Backups is perfect and the compression.
Thanks,
Jörg

Hello!

Thank you for the feedback. A summary at the end of the log and log resizing should be easy to implement. Hopefully, I will do it over the weekend. For other stuff, I’m not sure I understood you.

  • “Is it possible to check running process and start stop it” - if you are running OpenHAB as a Windows service, and you enter correct Service name, application will stop service automatically when you are performing update or restore, and start service after finishing all operations.
  • “Better Backup for openfiles” - did you mean locked files? The only way to put those files in an archive would be shutting down OpenHAB. Maybe stopping/starting service (the same as with restore and update) would be solution?
  • “external Logfile for every Backup” - something like writing physical file for every backup, with log text?
  • “Better for searching the long list” - does this refers to resizing log, or you’ve meant a search function inside a log?

Best regards,
Davor

The first is my problem :wink: I didnt run openhab as a service.

“Better Backup for openfiles” yes i mean locked files … my Problem :slight_smile:

“external Logfile for every Backup” yes a log file on the disk where i can check the backupstatus before i restore the archive.

“Better for searching the long list” try to resize the window. The logviewer is still the same size.

Oh and is there a way to start it without a gui for a sheduled task?

Hi @davorf! Yes, I guess I am the right person to ask :slight_smile:
We do not have any publicly available “logo usage guidelines” yet, sorry, but this is planned, though.
In general, we want to apply similar rules as given here: https://github.com/logos
That means: It is ok to use the logo when referencing openHAB, but as an application logo, it should be reserved to “official” apps and components, so that people are not confused. I am aware that this isn’t the answer you’d like to hear, but I hope you can understand it nonetheless.

Btw, the “official” support for backup/restore/update can be found in the console commands in openhab-distro. As the required logic can adapt over time, it is always recommendable to use the official features for it - and it would be great if all Windows developers in the community could collaborate on those to get it working as smoothly as possible (see e.g. https://github.com/openhab/openhab-distro/pull/622). Are you aware of these efforts and would you consider joining these efforts?

Best regards,
Kai

Hello!

Regarding resizing of the log, it’s definitely a bug, and I will fix it as soon as possible. As I said before, same goes for a log summary - it should be added, and a bug with log fixed over the weekend. Regarding other stuff:

  • Since I’m running OpenHAB as a Windows service, I haven’t invested much time to find a way to shut it down, I’m just checking if java and cmd are running and show the message if they are. Since many users are probably running OH as a Windows application, I could try to find a way to shut it down (not just terminate it), but it will take some time. Maybe SSH connection to OH and sending shutdown command would be a solution.
  • Do you think that implementing shut down while doing backup (same thing that happens with update and restore) would be a solution for locked files? I don’t like restarting OH myself, because I have some problems with restoreOnStartup, but I can live with that, if that would make an app better.
  • After finishing bug fix and a log summary, I will make writing logs to a file an option (for all the operations, not just backup)
  • Regarding CLI usage (without a GUI), I have planned something like that, but it will probably take pretty much time (I’m really new to C#), so I can’t tell how much it would take to do that part.

Thank you for your feedback once again.

Best regards,
Davor

Hello!

Thank you for a thorough explanation. I understand, and I supposed that logo and other OH related stuff are reserved for an official apps - that’s the reason I haven’t used any icon - but decided to ask anyway :slight_smile: Icon doesn’t matter whatsoever :slight_smile:
I wasn’t aware there is official support for those functions. This isn’t meant to be anything official nor “official”, just a tool I made for myself (I’m pretty lazy when it comes to repeating same stuff over and over), but thought it could help other people as well. Regarding joining efforts, I could try and help, as much as I can, when I have a free time. But I will have to see if I have enough knowledge to be of any help first.

Best regards,
Davor

1 Like

Hello!

I’ve pushed changes and new binaries to the GitHub:

  • Fixed bug - resizing window didn’t affect visual components
  • Logging - summary after finalizing operations (number of files/folders affected by category).

I found a way to stop OpenHAB when restoring backup/updating, if it’s being run as Windows application, but it will take some time to make necessary changes and test it.

Best regards,
Davor

Thank you for your tool.

What is the difference between full backup and config backup?

I am building a new server. Both the old and the new one are on Windows 10. Do you recommend to use in that case the full or the config backup?

Hello!

I haven’t been using app since they’ve introduced official PS update script. Backup of Windows OH is just a copy of OH folder. Full backup copies and zips complete OH folder, while configuration backup copies and zips only conf and userdata subfolders. What you will use depends on what you need. You can make full backups and keep certain number of them, and delete older ones.

Best regards,
Davor