Synology DiskStation

synology
Tags: #<Tag:0x00007f0148483848>

(j4ckz0n3) #323

The same happend to me last weekend. I updated from 2.2.0 to 2.3.0 on my DS213+ and lost all my bindings etc.

@cniweb Is there any update manual for the Synology users? Can we use the backup, update and restore scripts from runtime/bin folder?


(Andre2308) #324

For the updatescript you ned unzip… synology uses normaly 7z.


(scott dee) #325

you have to edit the backup script to use 7z. its a bit of a pain


(Mark Lavercombe) #326

@waspie @andre2308

Could either of you clarify? Is there a good post somewhere that details exactly how to backup, upgrade and restore an OH 2.* install on synology nas?

I haven’t been able to find one and am currently working on getting everything back up and running again :frowning:


(acs) #327

+1 with this request!


(scott dee) #328

I will try to shed some light on what i know about this process later today


(scott dee) #329

The smartest solution here is to use Hyperbackup and schedule backup jobs that way.

To use the in-built backup scripts … crap, i don’t have it installed as a package anymore…

I’m kind of in the middle of moving probably 200 mqtt items to the new mqtt binding. I’ll get back to you on this.


(scott dee) #330

I lied, I forgot I installed 2.4 on my other syno

Firstly, enable the recycle bin for the share you confs are on. that’s the first line of defense. The second is to install the hyperbackup app and setup a backup schedule. the third is editing the built in backup script.
the script is located @ /volume1/@appstore/openHAB/runtime/bin
If you installed nano, use nano. If you know how to use vi, you’re a better man than I.
nano backup
find this line:

command -v zip >/dev/null 2>&1 || {

replace with

command -v 7z >/dev/null 2>&1 || {

find

OutputFile="$OPENHAB_BACKUPS/openhab2-backup-$timestamp.zip"

replace with

OutputFile="$OPENHAB_BACKUPS/openhab2-backup-$timestamp.7z"

find

your code goes here

find

  zip -qr "$OutputFile" . || {

replace with

  7z a -r "$OutputFile" . || {

(Christian Häussler) #332

Thanks, I think we can include the backup script with changes for synology directly in the package.


(scott dee) #333

Similar edits will need done to the restore script, too. Forgot to mention that.


(acs) #334

Here’s some info on upgrading from 2.3 to 2.4.

A clean install (without changing the /smarthome/openHAB folder) resulted in the error above, so I tried to update it (it wouldn’t at first, so I uninstalled and tried that).

First off, I configured Hyper Backup for making sure to have a copy of my /smarthome/openHAB folder.

Updating 2.3 to 2.4 only worked after I renamed the existing openHAB config folder and restored it. This is because the tmpfs folder would not allow a proper install. Error below:

2019-01-20 23:10:25&gt; -----------------------------------------------------------------
2019-01-20 23:10:25&gt; called with stop
2019-01-20 23:10:25&gt; stop: copied TMPFS to Saved
2019-01-20 23:10:25&gt; stop: /volume1/smarthome/openHAB/userdata/logs is mounted =&gt; start unmounting /volume1/smarthome/openHAB/userdata/logs
2019-01-20 23:10:25&gt; stop: /volume1/smarthome/openHAB/userdata/persistence is mounted =&gt; start unmounting /volume1/smarthome/openHAB/userdata/persistence
2019-01-20 23:10:25&gt; stop: /volume1/smarthome/openHAB/tmpfs is mounted =&gt; start unmounting /volume1/smarthome/openHAB/tmpfs
2019-01-20 23:10:25&gt; stop: directory /volume1/smarthome/openHAB/tmpfs exists =&gt; removing
2019-01-20 23:15:26&gt; -----------------------------------------------------------------
2019-01-20 23:15:26&gt; called with stop
2019-01-20 23:15:26&gt; stop: copied TMPFS to Saved
2019-01-20 23:15:26&gt; stop: directory /volume1/smarthome/openHAB/tmpfs exists =&gt; removing
2019-01-20 23:19:35&gt; -----------------------------------------------------------------

Installed 2.3 again, without TMPFS or Zwave.

I then installed 2.4 over 2.3, with TMPFS and Zwave. Even though it returned a failed installation at the end of the package installation wizard (common issue, at least with me), it actually installed properly this time. It only ran after a second trial to start, although the HTTPS port wouldn’t work. HTTP did, and that’s what I’m using.

The upgrade was not successful in keeping the configurations. At this time, I stopped the package and rebooted the NAS because I was still having issues with TMPFS. After this I copied the config files again, and even though openHAB would now start without asking to create UI elements, it was basically empty.

In the end I had to install the Zwave binding again and subsequentially all devices.

I’m wondering if using Docker would make this process easier? How does an upgrade go about in the Docker version, you download and clear the container?


(scott dee) #335

pretty much, but i gave up on the docker install. Mine would stop updating items at random times between 6-18hrs every time. even with most bindings removed. I went back to the SPK install and it’s been solid as a rock.
That said, I think it may have been related to MQTT 1.x + 2.x that caused it but I’m not certain