zwave-js / zwave-js-ui

Full featured Z-Wave Control Panel UI and MQTT gateway. Built using Nodejs, and Vue/Vuetify
https://zwave-js.github.io/zwave-js-ui
MIT License
947 stars 203 forks source link

[question] Simple way to backup setup / move to other host? #928

Closed TheDK closed 3 years ago

TheDK commented 3 years ago

I am currently running zwavejs2mqtt as an add-on on Home Assistant on a RasPi3b. I can use the Snapshot und Restore function of HAss to backup the whole system and recover more or less on any hardware I can run HAss on - also can use this to migrate to different host.

Now the open issues on HA (store access not working, problem with OTA updates, etc.) for the add-on seem to show that this is not a priority for the HAss team (which is somehow understable given the primary role of the own Z-Wave JS add-on). This is why I contemplate to run it myself using this guide (without MQTT): https://flemmingss.com/how-to-set-up-zwavejs2mqtt-on-a-raspberry-pi-and-integrate-it-with-home-assistant/

Question: If I want to make sure I have an easy way to recover if I lose the RasPI how would that work? I am new to docker on Linux, so this might be totally standard and easy, just wanted to know what your way would be to do that.

Just FYI: I have a backup of the Aoetec Z-Wave Stick so you can presue that the controller including all node information is still present. I just want to make sure that if I move the controller to a new host I want to make sure that HA on a different host doesn't note it all...

robertsLando commented 3 years ago

Just backup everything that you actually have in the store folder of the project and restore it on the new instance and you are done

TheDK commented 3 years ago

Is it also possible to move between the HA add-on and the stand-alone version as long as it is the same version?

I am new to docker and tried to find out how to cop files out of / into a container and it seems to be rather tricky (either by installing SSH or a storage driver). In another issue you considered providing an upload option - together with the existing batch download as an archive that I believe would fix this challenge for people like me. Is that realistic or rather far down the line if at all?

Thanks for the feedback!

robertsLando commented 3 years ago

If you go to store in the ui, select all files in the list, press on the fab icon on bottom right corner you will be able to download all files in a zip archive. Then simply start the application as standalone and map store directory to a local folder where you will unzip all the content of the previously downloaded zip file and you are done

TheDK commented 3 years ago

Thanks, understood. Apparently I really have to get into docker... :)

robertsLando commented 3 years ago

Apparently I really have to get into docker.

Nope, you can do almost all from the UI. Then if you map the volume to a local golder it's as easy as unzip the content to a folder

TheDK commented 3 years ago

UI as in ZWaveJS2MQTT UI or a Linux distri with an UI? I noticed that you can edit all files in Store using the UI - so worst case would be copy / paste the content of a couple of files using the UI, reboot, and good to go without even having to mount?

Full disclosure: I google Docker mount local host folder and got results from a one line command to editing config files, persitency, etc. -> This I why I wrote "have to get into docker" as I don't have a real grasp of the difference between a VM and a container, but probably should have.

Sorry for bugging you with basic topics and thanks for the feedback - greatly appreciated! I sent a little tip your way over PayPal just now.

robertsLando commented 3 years ago

o worst case would be copy / paste the content of a couple of files using the UI, reboot, and good to go without even having to mount?

That's another possible solution if you only need settings backup you can download them as json file and import them directly in settings page

Sorry for bugging you with basic topics and thanks for the feedback - greatly appreciated! I sent a little tip your way over PayPal just now.

Saw it, thanks :pray: :heart:

kj4qyf commented 1 year ago

I'd like to be sure to understand the process. I have activated the backup in Zwave JS UI and I can see the daily backups in Store-Backup-NVM. That folders has 4.0 KB for 7 backups, which sounds very small to me. My simple question is that I want to make sure that I can restore my Zwave network in case my Zooz 800 dongle goes bad and needs to be replaced. How would I do that ?

robertsLando commented 1 year ago

There are 2 types of backups, NVM backup and store backup, them are stored by defaul in backups/store|nvm folders in application store direcrtory. Backups sizes are not so bigg but also depends on network size, my nvm backup takes ~200KB and store backups zip files are around 20KB for a network of 10 devices. But it really depends on the devices you are using and how many values they have as store files includes some cache files where all device information are stored.

In case something bad happens if the stick is ok you just have to restore the store backup in a new zui instance (this can be done from store explorer) and if also your stick is dead you have to firstly restore nvm backup from control panel advanced actions

kj4qyf commented 1 year ago

Many thanks, I think that I have it set up. My Store backups are about 175 kb (I have some 80 Zwave devices) and the NVM backups don't show the kb size. I should be ok. Thanks again.

robertsLando commented 1 year ago

You welcome :)

TheKorn2 commented 7 months ago

I'm looking at backing up and restoring (preventative maintenance), and stumbled across this thread.

Is it accurate to say that I only need to regularly copy backup/nvm and backup/store someplace safe to have everything I need to fully restore zwave-js-ui in the case of complete system failure?

Let's say someone absconds with my mini pc. I'd need to:

  1. procure identical zwave stick (not 100% necessary but let's assume this for now)
  2. install zwave-js-ui
  3. in advanced options, do a backup import
  4. restore the stick's nvm using NVM management

Is this accurate? Is that really all that's necessary? Is there really a Santa Claus?

kj4qyf commented 7 months ago

I think that this may be accurate but I have also read somewhere that this does not yet work with the Zooz 800 stick. What I have done is to (every few months) use the Simplicity Studio App to backup my stick. It is bit complicated but it is my safety solution.

TheKorn2 commented 7 months ago

Well, sadly this process doesn't work. Restoring zwave-js-ui from the backup store works, but restoring the NVM faceplants and says "error while calling resoreNVM: did not find a matching NVM 500 parser implementation! Make sure that the nvm data belongs to a controller with zwave SDK 6.61 or higher (zw0280)"

Of course, the backup file was created with a zstick with zwave SDK 7.19.3, sooo... yeah.

Any hints @robertsLando ?

TheKorn2 commented 7 months ago

Ahhh, dangit... this is a zwave-js issue, not js-ui. I searched for nvm and 800 in issues here, but really I should have been looking here.

robertsLando commented 7 months ago

Ahhh, dangit... this is a zwave-js issue, not js-ui. I searched for nvm and 800 in issues here, but really https://github.com/zwave-js/node-zwave-js/issues/5257

Yeah :)

kj4qyf commented 7 months ago

Thanks for the info. Should the Simplicity Studio backup/restore work ? I have made several backups in Simplicity Studio but have not tried (and don't need) a restore.


From: Daniel Lando @.> Sent: Monday, February 5, 2024 7:44 AM To: zwave-js/zwave-js-ui @.> Cc: kj4qyf @.>; Comment @.> Subject: Re: [zwave-js/zwave-js-ui] [question] Simple way to backup setup / move to other host? (#928)

Ahhh, dangit... this is a zwave-js issue, not js-ui. I searched for nvm and 800 in issues here, but really zwave-js/node-zwave-js#5257https://github.com/zwave-js/node-zwave-js/issues/5257

Yeah :)

β€” Reply to this email directly, view it on GitHubhttps://github.com/zwave-js/zwave-js-ui/issues/928#issuecomment-1926918601, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHI6JKG7YTJNF73GB6OEOTLYSDH4TAVCNFSM4ZTK2WL2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJSGY4TCOBWGAYQ. You are receiving this because you commented.Message ID: @.***>

robertsLando commented 7 months ago

Should the Simplicity Studio backup/restore work

I think it should but I never used it. cc @AlCalzone

kj4qyf commented 7 months ago

thanks


From: Daniel Lando @.> Sent: Tuesday, February 6, 2024 3:45 AM To: zwave-js/zwave-js-ui @.> Cc: kj4qyf @.>; Comment @.> Subject: Re: [zwave-js/zwave-js-ui] [question] Simple way to backup setup / move to other host? (#928)

Should the Simplicity Studio backup/restore work

I think it should but I never used it. cc @AlCalzonehttps://github.com/AlCalzone

β€” Reply to this email directly, view it on GitHubhttps://github.com/zwave-js/zwave-js-ui/issues/928#issuecomment-1929032627, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHI6JKCSI3NOAE3YB2WDHLTYSHURZAVCNFSM4ZTK2WL2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJSHEYDGMRWGI3Q. You are receiving this because you commented.Message ID: @.***>

TheKorn2 commented 7 months ago

@kj4qyf I just backed up one of my zst39s to another with simplicity studio, then used that second stick with zwave-js-ui to lock/unlock a s2 device. Works.

kj4qyf commented 7 months ago

That is great news for you and for me πŸ™‚


From: TheKorn2 @.> Sent: Tuesday, February 6, 2024 11:43 AM To: zwave-js/zwave-js-ui @.> Cc: kj4qyf @.>; Mention @.> Subject: Re: [zwave-js/zwave-js-ui] [question] Simple way to backup setup / move to other host? (#928)

@kj4qyfhttps://github.com/kj4qyf I just backed up one of my zst39s to another with simplicity studio, then used that second stick with zwave-js-ui to lock/unlock a s2 device. Works.

β€” Reply to this email directly, view it on GitHubhttps://github.com/zwave-js/zwave-js-ui/issues/928#issuecomment-1930314970, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHI6JKDKVA56G2XICTWWFALYSJMTZAVCNFSM4ZTK2WL2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJTGAZTCNBZG4YA. You are receiving this because you were mentioned.Message ID: @.***>