Automatic download backups for Hubitat

The same can be done using a home NAS if you have one.
And most NAS devices have the ability to upload to cloud, Dropbox, Box, Google

1 Like

I wish I had a NAS :slight_smile: I want one for a Plex server but hard to convince the wife that it would be worth spending the money.

A NAS would be great for storing her pictures. :wink:

1 Like

I told her it would be like Netflix but our own downloaded movies so you don't have to cast them to the TV.. She's warming up to the idea....

1 Like

That's a great idea.

I didn't want to hijack this thread with my attempt so I created a new thread here for using Google Cloud to backup the Hubitat

If anyone is interested pop over to this thread..

Edit: updated to a little more proper powershell script with parameters

Add the hub name into the file name as well and you will have some new fans. :slight_smile:

I know a few people (especially with multiple hubs) wanted that so they could distinguish where the backup was from.

The hub name is now included. I made it into a script with parameters.

2 Likes

So, I'm not clear on how I can use this, being that I have a Mac Mini and a Synology NAS to work with. Or do I have to have an always-on windows machine?

There are curl scripts in the community that you can use on a Mac or NAS. The NAS is probably the better choice since it is a storage device and likely doesn't get powered down.

Edit @JustinL there are several in this thread [SOLVED] Downloading Latest Backup File - #30 by syepes

Here is a very simple one as well.

The backup generated with your script seems to be a lot smaller than the native Hubitat backup. I feel like something is going wrong somewhere. Do you have any suggestions on why your scripts backup is much smaller?

The script backups look to be valid or at least the sizes match the backups stored within my Hubitat device.

I've generally kept my hub very current with updates. On my hub the backups have been about 2000KB until 8/16/2010. Since 8/17/2020 all my backups are about 560KB.

Perhaps the compression used for the backup has changed.

The number of events stored per device has been truncated substantially.

2 Likes

I've updated the script to 1.0.2 which fixes retrieval of the hubitat version so it is included in the backup file name.

1 Like

My native hubitat backups are 2MB, but the script generates file of just 12KB. Wonder if it has anything to do with the C7 being on a different VLAN than the server running the script. Any idea what port needs to be opened?

TOO MANY FIREWALL RULES!

I only have a C5. I wonder if the HTML is different for the C7. If someone doesn't mind sending me privately a .zip of the Settings web page I should be able to test this out. In Chrome it would be Save-As and then "Webpage, Complete".

The same backup command works on the C7. When I goto the backup link, the backup downloads correctly. Is that the info you were looking for? Or should I still send the html?

Thanks for the script! I didn’t know I wanted to do this till I stumbled across this thread. Kicking it off nightly with Task Scheduler, saving to DrivePool and sending to Google Drive with Rclone. :+1:

It sounds like it is working for C7. The real confirmation would be to perform a restore of a backup.