Restore backup from a very old home assistant core install

Looking to complete a major upgrade from image: homeassistant/armv7-hassio-supervisor:2022.10.0 to 2025.1.x. Before shutting the container down, I simply took a backup and it provided me a backup.tar. After starting a brand new install, I’m finding it difficult to restore this backup as the encryption keys seem to be different…

I see errors when trying to restore

The backup is encrypted with a different encryption key than the one stored on this system. Please enter the encryption key for this backup.

The provided encryption key was incorrect, please try again.

I don’t recall having any encryption key in the older implementation. I’m guessing this isn’t going to be possible and I would need to start over completely at this point?

I’ve tried using this 3rd party python package just to see what happens. However, this doesn’t get me anywhere.

python3 -m decrypt-ha-backup /../../Downloads/backup.tar
Please provide the password used to create this backup.  The password is called 'Encryption Key' in the Home Assistant UI.  Providing the wrong password will result in a corrupted decrypted backup.
Backup Password:
This backup file isn't encrypted

Here’s my guess …

  • The old backup isn’t encrypted (or is encrypted but with an old encryption key; used to be called a password).

  • New backups are encrypted using an encryption key generated the first time an encrypted backup is created.

  • When restoring a backup, Home Assistant attempts to decrypt it using its latest encryption key.

  • The old backup isn’t encrypted (or is but not with the latest key) so the restoration process fails.

I would like to offer you a solution but I don’t currently have any practical experience with the new backup system.

I can open and view all the yaml files for blueprints, automations, groups, etc. Is there any guide for manually placing these files? I wonder if I can simply exec into the new container and start dropping yaml where it makes sense.

You can install the samba add-on, untar your backup, and drop the files in the directory where your configuration.yaml is. Don’t forget the hidden files and directories ! And stop HA before you replace the existing files.

You can try making another backup of the old system but this time set its password to whatever is your encryption key on your new system (it’s stored somewhere in the hidden .storage subdirectory).

No idea if the restoration will succeed but it’s easy to do so worth a try.

Thank you for the suggestions. It seems the home assistant instance is up behind the scenes. Automation’s are being triggered via timers, buttons and times of the day… However the supervisor is not allowing me to connect to the GUI to attempt any meaningful strategy.

ERROR (MainThread) [supervisor.homeassistant.api] Error on call http://172.30.32.1:8123/api/config: Server disconnected

Given I have a valid manual tar backup from before losing connectivity, can I just extract it and drop the appropriate folders/files into the new installation? (the old semi broken one is running on a different host than the new one)

I’ve been basically able to piece things together after installing home assistant on another host by copying .yaml until it stops complaining.

Once I had all the existing blueprints, automations, and other various config the new instance started just fine. I did lose the zigbee database however I’m personally fine with it as it was created four years ago and many entities are gone, renamed; it’ll be nice to start over in that regard.

Using the same names for devices I still care about made it pretty simple to plug in those device names using the same blueprints and automations.