Backup to Computer automated

They are, but if you try to insert a quarter into a penny slot, you wouldn't be able to squeeze your coin in, do you?

You can save a backup from older models, but only C-8 and C-8 Pro can restore the Zigbee network. The data in the backup file contains everything, but the hardware in older models is unable to restore it.

This is where Hub Protect really shines. If you have an older model, you can back up your entire system to the cloud. Then, if disaster strikes and your hub fails, you can take advantage of the special Hub Protect benefits and upgrade to a newer model at up to 50% off - or same model for free, and quickly restore your backup.

That means you’ll be back up and running in 10 minutes or less* (plus shipping/delivery time).

*Assumes the Z-Wave/Zigbee mesh on the old hub was healthy.

4 Likes

As @aaiyar described, a script can be in any language and on any device that is capable of sending an http webhook to the hub.

It’s slightly easier to setup if hub security login is not enabled, but can be made to work with login security too.

I started with a script that @chowell wrote and edited it slightly for my needs. It runs in a Linux VM.

2 Likes

what language would the script be? Where would it run?

I use a Windows .bat file on my computer to back up my hub locally. I then call it from Windows Scheduler every Wednesday at 8am. I also check the box that says run it if missed, so it will run the next time I turn my computer on if it's not on at 8am on a Wednesday. The script also deletes backups older than 90 days, but you can change that at the top to keep more or fewer backups.

Save this to HubBackup.bat in your backups folder and call it from Windows Scheduler
@echo offsetlocal
set "days_old=90"
set "ip_address=[your hub's IP address, eg: 192.168.1.10]"
set "folder_path=[path folder to store backups, eg: C:\hub backups]"
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo   Grabbing backup from Hubitat...
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
curl -O -J --no-clobber --output-dir "%folder_path%" http://%ip_address%/hub/backupDB?fileName=latest
echo Done.
echo.
echo.
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo   Deleting backups...
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo Deleting hub backups older than %days_old% days...
forfiles /p "%folder_path%" /M *.lzf* /D -%days_old% /C "cmd /c echo Deleting @file... && del @path"
echo.
echo Done.
echo.
timeout 15

The caveat to this as others have pointed out is that it does not automatically back up the devices and radios.

2 Likes

Local backups contain everything but the radios data. Drivers and devices on Devices page are included. Nodes data on Z-Wave and Zigbee Details pages is not included.

3 Likes

I'm pretty sure that the C5 hub with the zwave radio chip built in will restore the zwave radio backup. It's the Zigbee that doesn't restore.

this is such a GREAT forum. I got clarity on backing up my hub with 2 example scripts AND a clear explanation of the limitations on backups to a C7.
In the process I also found a great app "Device Data Item Display" so I can inventory all of my devices
Amazing!!!!

7 Likes

And I learned something I had taken for granted for a couple years now.

My C7, which I’m still using, couldn’t actually restore the zigbee database to itself if it were somehow wiped but the device remained functional (not a likely scenario for me).

1 Like

Yup it is technically possible, but not using the stack that Hubitat used for the C-5.

They rewrote their zwave stack for the C-7 ….

Can you explain further? The hub protect backup documentation says that the zwave radio will be restored (North America).

From the official docs.....

Z-Wave migration is supported to and from any hub model using internal radios, as long as it is the same or newer model as the hub being migrated from. This includes migration from:

any hub C-7 or newer
any C-5 hub if using the internal radio (the default configuration for North America)
certain C-5 or older hubs if the external Z-Wave adapter in use us the Z-Wave.me adapter (other adapters are not supported):

2 Likes

The documentation is wrong. Z-Wave restore can only be performed on C-7 and higher. Z-Wave backup can be done on a C-5 and higher.

2 Likes

We are working on making it clearer. Thanks for your feedback...

2 Likes

That's nice... Thank you for setting the record right. I think I'll cancel my hub protect.

The documentation is missing 2 words:

To - any hub C-7 or newer
From - any C-5 hub (or newer) if using the internal radio (the default configuration for North America)

2 Likes

FWIW, I'm 99.99% sure that C-5 Hub Protect subscribers are provided with a newer hub if their protected hub fails (@bobbyD - can you confirm this). Hubitat Inc doesn't screw over its long-term customers and well-wishers.

And the cloud backups made on a C-5 can definitely be restored on a newer hub without requiring devices to be re-paired.

2 Likes

I am 100% sure that Hub Protect subscribers get a hub they can use with the service they have been paying for, though most use the Hub Protect special discounts available only to subscribers to upgrade to the latest version when their hub dies.

4 Likes

what does that even mean??? " Hub Protect subscribers get a hub they can use with the service they have been paying for"
... if you had a C5, what would you get
..... if you had a C7, what would you get

It means they’ll work with you to replace the hub that failed with a like or newer hub for no cost.

Depending on how old the failed hub is, it won’t automatically be the newest gen hub.

But my guess is that this:

Makes purchasing the newest hub (whatever gen it is now or in the future) a no-brainer for anyone that is able to make use of it.

Are they going to tell us here in the forum what the magnitude of that discount is? I kind of doubt it.

4 Likes

Great question! What would you consider to be a valuable benefit for a Hub Protect/extended warranty service in these circumstances?

Why not? Transparency is fundamental to earning trust. :blush: If someone is paying for a service, they deserve to know exactly what they’re getting into. Anything less feels like ordering a burger and getting a salad. :wink:

Now, before I share more details, I’m just curious to see if we match @tim.ocallag’s expectations — so I’ll let him chime in first!

3 Likes

image

2 Likes