Migrate zigbee2mqtt configuration

This all depends on how you are running Z2M now and on what config you want to transfer it to.

I want to move the zigbee2mqtt addon backup to zigbee2mqtt LXC

FYI: have you bumped on the Proxmox helper scripts from @tteck, there is a script to install Z2M so I would already use that.
But, the zigbee2mqtt webUI does not provide a way to restore a backup, only to create one.

I’m running Z2M in a LXC but I have no idea what the add-on backup contains as info and if/how this can be used to migrate.
This thread contains some useful information, did you go through it?

Z2M works well in LXC, but I can’t figure out how to transfer the backup to LXC.

The config is stored in your coordinator.

Can you post a tutorial?

i migrated from homeassistant addon to lxc container:

  1. first setup lxc container with the helper script (i used alpine)
  2. installed ssh
    2.2 β€œapk add openssh”
    2.3 started ssh β€œrc-service sshd start”
    2.4 changed root password to login β€œpasswd”
    2.5 β€œvi /etc/ssh/sshd_config” uncomment permitrootlogin yes
  3. SCP everything from the backup of the frontend into /etc/zigbee2mqtt folder
    3.1 on windows type into powershell scp "C:\Users\****\Downloads\z2m-backup.1.40.2.2024-10-15-23-47-12\configuration.yaml" [email protected].**.***:/etc/zigbee2mqtt
    3.2 do this on all files
  4. nano /etc/zigbee2mqtt/configuration.yaml change the configuration to adapt the new serial location and change your mqtt ip adress
  5. rename mv coordinator_backup.json coordinator_backup.json.old
  6. rc-update add zigbee2mqtt default
  7. rc-service zigbee2mqtt restart

After that, my Zigbee2MQTT continued from where it left off in the Home Assistant add-on.

2 Likes