Database Backup: Include Hub Name in file name

I manage more than one hub. If, when backing up a hub's database, the suggested file name could include the name I've given to the hub (or any other hub-specific designation) it would be so tremendously helpful.

Thanks @bravenel and others for your consideration!

If it isn't immediately obvious why, please ask and I'll explain. I haven't actually had a catastrophe yet, but I always feel like I'm flirting with disaster! :slight_smile:


As someone with multiple hubs, it's not difficult to understand why.

As a suggestion, I keep offline backups and give each of my hubs a unique name in my backup script. Would it be possible to do something similar in your backup protocol?


Me too..

curl -s -o "./fourthhubitat/FourthHubitat_$(date +%Y-%m-%d-%H%M).lzf"


Genius! I have, obviously, been trying to manually download them into separate directories and keep them straight. However, despite being painfully careful, I discovered that I've still somehow goofed some up.

Every time I've been backing up, I've either just completed something I wanted to preserve or I was about to do something risky so I wanted to get the state as close to current as possible. So I've always been having the hub create a new backup and have been downloading that. I tried to do it with a GET request the other day, but wasn't successful. It is on my to-do list to see if I can figure out a way to do it. It never occurred to me to download one of the automatic backups for some reason. I'll start doing that and it will help a lot. Thank you for the tip.

You don't happen to know off the top of your head what parameters to /hub/backup would cause it to create a new backup do you?