#Is the ZHA restore .json in HA backup

1 messages · Page 1 of 1 (latest)

balmy basin
#

just like the title already said, is the ZHA restore .json in HA backup?

eternal osprey
#

no; the HA backups include the ZHA database and will restore things back to the existing state - it will assume the same zigbee coordinator is still present.

#

that said - I think you might be able to "reconfigure" the zha integration to migrate to a new radio without the previous radio being present? It's not something I've tried, hopefully someone else can confirm or deny that :/

#

more specifically, the network backups aren't stored in the json format in the HA backup, but are rather stored inside the sqlite zigbee.db file

balmy basin
#

Okay, so can I restore the ZHA config/db only and not the HA completly?

eternal osprey
#

I don't think there's any way to do that from the ui; since ZHA is an integration it would require doing a whole "Home Assistant" (core) backup/restore.

balmy basin
#

I hae zigbee.db and zigbee.db-wal in the backup

eternal osprey
#

If zha isn't running, it might be ok to manually replace only the zigbee.db* files in your data directory - but I don't know whether that would cause issues or if it depends on configuration elsewhere :(

#

in other words - make sure you do a new full backup before you try that :)

balmy basin
#

Yea, that's for sure 😄

#

Yeah, restoring the zigbee.db worked, but the names are still gone. Guess they are saved somewhere else.

eternal osprey
#

device/entity names would be stored in the main home assistant database, yeah

#

so you might actually want to restore the full ha backup then, unless it's so old that you'll lose something important.

balmy basin
#

I'm gonna do a full backup, it's only 3 days old.

eternal osprey
#

Hmm. well, i was curious how hard it would be to generate a json zigbee network backup from the sqlite database, turns out it's this hard: https://gist.github.com/kepstin/e51491855be7abd936a54143704988c7 (that wouldn't really have helped you tho; would have provided the same results as restoring the whole zigbee.db did)