openhab / openhab-syno-spk

openHAB Synology SPK Install Package
Eclipse Public License 2.0
161 stars 42 forks source link

Provide folder USERDATA as well in \public\openHAB2\. #103

Closed loovanloon closed 7 years ago

loovanloon commented 7 years ago

ENHANCEMENT: For backup and restore purposes of the installation configured through the paper UI I think it is usefull to provide access to the USERDATA folder as well in the \public\openHAB2\ folder

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/50155165-provide-folder-userdata-as-well-in-public-openhab2?utm_campaign=plugin&utm_content=tracker%2F19715072&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F19715072&utm_medium=issues&utm_source=github).
cniweb commented 7 years ago

The folder USERDATA should also be linked via /public/openhab2/ or /smarthome/openhab2/ or /var/services/homes/openhab2/

SchoppAx commented 7 years ago

@cniweb tell me if I'm wrong, but i think the "innovation" of the openhab2 config files (userdata) are, that they can be full managed with the PaperUI. So the user doesn't need to change the config files itselfs.

loovanloon commented 7 years ago

@SchoppAx The issue is not changing the files, but backing up the files.

In OH2 there are indeed 2 ways of configuration:

  1. through config-text files: stored in /openhab2/conf/ (OH1 style)
  2. through PaperUI: stored in JSONDB in /openhab2/userdata/

Hence to (easily) backup the configuration that was made through the PaperUI (and stored in JSONDB) you also need easy access to /openhab2/userdata/

aurelio1 commented 7 years ago

While the PaperUI can make several things easier, it is far from being that powerful to replace manual editing of config files. But the config files are already linked in the public folder so it is no issue at all editing them from DSM. If you set up a new device, from my experience it happens often that you have to check the logfiles or changing some log settings (these are also in the userdata folder). I did the link myself, but for sure it would be useful if the SynOH2 installation linked the userdata folder to the public as it does with the config folder. And for backup also, as you write. It is useful anyway.

cniweb commented 7 years ago

Another case would be the update. Because the update does not work, but only an uninstall and install. The data will be deleted.

cniweb commented 7 years ago

@loovanloon and @aurelio1 I add the userdata folder, is this ok (see my commit)?

aurelio1 commented 7 years ago

@cniweb Great, thank you! I just wondered why it is necessary to remove the single userdata subdirectories such as tmp, log, logs and cache. Why didn't you do it at once, as with the conf directory that includes all subdirectories? I did it manually up to now and moved the directory and linked to it in one operation.

cniweb commented 7 years ago

@aurelio1 Because the directories: config, etc, jsondb and kar contain data that must be retained during the update.

loovanloon commented 7 years ago

@cniweb Christian, Where can I download the SPK that contains the change? I'm quite new to Github.

cniweb commented 7 years ago

I think I have time this sunday...

cniweb commented 7 years ago

@loovanloon New version is released: https://github.com/openhab/openhab-syno-spk/releases/tag/2.2.0.008-SNAPSHOT