Automate Zwave backups?

I have found that http://yourip/cgi-bin/cmh/ will give you a tgz of your /etc directory including recent Zwave backups in the dongle files. Is there a way to automate the Zwave backup be it via an API call or CLI or any other way? What I would like to do is have a Zwave backup run prior to pulling the full backup off of the box. The fact that Zwave backups are manually run, I’d love to periodically run them automatically as I’ll forget otherwise when I make a change.

In Lua:

luup.call_action("urn:micasaverde-com:serviceId:ZWaveNetwork1", "BackupDongle", {}, 1)

As a Luup request:


Also supported via Reactor Device Action in an Activity on device #1 (ZWave).

1 Like

That’s excellent. Thanks so much!

1 Like

For anyone who might need it in the future, here is my quick and dirty “off-the-box” backup script.

#Start the ZWave backup
curl -s "http://your.vera.ip.addr/port_3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:ZWaveNetwork1&action=BackupDongle&DeviceNum=1"
#Give the Zwave backup time to run
sleep 2m
#Change to the directory where you want to store the backups
cd /to/some/directory
curl -O -J http://your.vera.ip.addr/cgi-bin/cmh/

There isn’t much smarts here. I’m just assuming 2 minutes is enough time for the Zwave backup to complete and on my box I have found 15 seconds is roughly the actual amount of time needed. Maybe someone can tell me if there is a URL to test the Zwave backup success against? Also, there is no sense of file pruning. This will just pile up backups forever.

I have a similar script with 60 secs wait. AFAIK there’s no way to check for success.

I considered SSH to do a stat and compare dates/times on dongle.dump.0 - but that seemed like effort. And hiding a lighttpd accessible script to do the same seemed like a good way to break something.

I also explored a local ssh script running on Vera via cron and copying the file locally, but it’s easier to run an external script. It’s more than 1 year that I have local backups going back to 60 days and it already saved my life a couple of times.

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules