hassio-zigbee2mqtt icon indicating copy to clipboard operation
hassio-zigbee2mqtt copied to clipboard

Backup of Zigbee2mqtt addon does not contain eg. friendly names of devices

Open heikkis opened this issue 1 year ago • 13 comments

Description of the issue

  • full HA backup and restore -> no devices
  • partial backup of zigbee2mqtt addon with one device, restored from backup -> no devices.

Addon version

1.39.0-1

Platform

All latest Core 2024.7.2 Supervisor 2024.06.2 Operating System 12.4 Frontend 20240710.0

Logs of the issue (if applicable)

No response

heikkis avatar Jul 13 '24 08:07 heikkis

Same result for 1.35.1-1 version backup and 1,5 year backwards even. Now I'm wondering where the device data should be if it is not in the addon's backup file.

Only these files are in the backup:

./addon.json
data/
data/options.json

heikkis avatar Jul 13 '24 09:07 heikkis

Same as above, just the options.json file..

BobMac57 avatar Jul 13 '24 10:07 BobMac57

I have found out that Zigbee2Mqtt addon provides backup functionality itself (basically it will make zip file of /data folder) which include all device settings, eg. friendly names and so on. Mind blowing, it seems not to be integrated to native addon backup feature.

Any ideas what that would mean in implementation? People are expecting that backup of addon would include all needed data to restore the addon. Clearly that is not the case currently.

heikkis avatar Jul 13 '24 19:07 heikkis

I have found out that Zigbee2Mqtt addon provides backup functionality itself (basically it will make zip file of /data folder) which include all device settings, eg. friendly names and so on. Mind blowing, it seems not to be integrated to native addon backup feature.

Any ideas what that would mean in implementation? People are expecting that backup of addon would include all needed data to restore the addon. Clearly that is not the case currently.

I saw that earlier and as far as I'm aware, this is the only addon that does this... doesn't make me a happy camper having to run a 2 step process to get a zip backup when IMO , should be in the HA backup strategy...

BobMac57 avatar Jul 13 '24 20:07 BobMac57

This is very bad, as some of use use backup plans and make regular automated backups of HA. In my case, I use the „Home Assistant Google Drive Backup“ to do this. So the resulting Backup is worth than nothing

FrankGiesecke avatar Jul 14 '24 06:07 FrankGiesecke

I checked a bit why this happens but cannot spot the error yet. The HA addon backup code creates a backup of the config which the addon defines here. Would be greatly appreciated if someone with more knowledge about HA addons could investigate this (I don't have a HASS setup myself)

Koenkk avatar Jul 15 '24 20:07 Koenkk

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Aug 15 '24 00:08 github-actions[bot]

Is there anyone working on this issue?

FrankGiesecke avatar Aug 15 '24 09:08 FrankGiesecke

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Sep 15 '24 00:09 github-actions[bot]

This issue still exists

FrankGiesecke avatar Sep 15 '24 05:09 FrankGiesecke

This is still an issue, how to backup?

ptfuzi avatar Sep 24 '24 09:09 ptfuzi

The problem is that the addon is mounting the general homeassistant config rather than the addon_specific one, i.e.

  "map": [
    "share:rw",
    "config:rw"
  ],

should be

  "map": [
    "share:rw",
    "addon_config:rw"
  ],

But changing this now means existing users will need to manually migrate their config files to the new location.

A less invasive approach would be to just mount the addon_config in addition to the current config and update the default for data_path so new users would automatically get the addon_config and existing setups would continue to work with the option for manual migration.

@Koenkk Please let me know if you'd like to see a PR for one of those

BigBoot avatar Oct 05 '24 08:10 BigBoot

@BigBoot I would love a PR, seems the second approach is the best

Koenkk avatar Oct 06 '24 20:10 Koenkk