Encrypted backup not restoring

I am an ihost + docker user

I had a problem with the ihost device and I had to reformat. I had both manual backups and the emergency kit with the key written.

I reinstalled everything, loaded my 2 backup files, when I tried to recover it rightly asked me for the password. I put the password of the emergency kit and it does not recognize it as correct.

I tried with a second backup, same problem.

and yet I had only one key generated in early January and my last backup is from this morning.

I spent 5 days configuring everything, creating maps, I have more than 200 devices between tuya, sonoff, etc, lots of rules and customizations and now I have to do everything again.?

because it does not read the key correctly.

But what is this encryption for? if it cannot recognize the emergency kit.

:frowning: I am discouraged.

1 Like

Hi and welcome to the forum. That does sound frustrating.

Can you try this script and see if you can decrypt your backups?

If so you could then load the decrypted backups to be restored.

I have a tweaked version of the above script here as well if you want to try it: GitHub - cogneato/ha-decrypt-backup-tool

It worked for the backups I tested.

you are right, I forgot to write that
Yesterday an update of the home Assistant image arrived, to be safe I launched a manual backup and then I ran the automatic update via the ihost/docker utility.

after the reboot my HA was completely reset from scratch.

so everything could have happened via the update.

now I try those scripts to extract the backup file
Thanks

it seems that the password is wrong and yet I have only created one, I only have that one. I don’t know what to say.

I will try the other tools suggested.

result:
root@kubeprx03:/home/kubewall#
root@kubeprx03:/home/kubewall#
root@kubeprx03:/home/kubewall# python3 decrypt.py -i ha_202501090028.tar -p VQA7-83CH-XTC8-SXMB-5UKJ-SZDS-8ZU6
Extracting ha_202501090028.tar…
Extracting secure tar homeassistant.tar.gz…
Unable to extract SecureTar - maybe your password is wrong or the tar is not password encrypted?
root@kubeprx03:/home/kubewall#

I tried the tools on cogneato (Ashton) · GitHub

but it gives me a programming error, now I try to see if I understand something in the source of the downloaded “decrypt_backup.py” file.

image|690x116

There is a wrong indentation on line 204:

, manual_key):

Script is broken/incomplete. See issue on github.