[Fixed] Blank integrations when restoring docker install to new host

I’m having a DEVIL of a time doing what in theory should be simple.

HA has been running as a docker container for years without issue, and I am now trying to move that docker container to a new piece of host hardware and it is going all kinds of wrong.

My first attempt was to simply tar.gz up the entire _data folder in the docker volume, drop it in the volume of the new host, and fire it up. When I did however it had a general sense of remember who it was, my existing login worked, etc, but ALL of my integrations were gone, most of my entity aliases, scripts, etc, were not there. (I double-checked and the .storage folder DID get moved over with the right contents, fwiw.)

So then I shut both container down again, and this time I took the blank volume on the new host and did a scp of the files from the original host into the new making sure I included hidden files… but the same result.

Is the only move here to do a fresh install of HA into a blank volume, then when running the first-launch UI jsut restore it from a backup snapshot file from the backup UI? (Haven’t even tried that yet, but assumed that’s an option here?)

I’m thinking this might be unrelated to my migration? When I went back to the old docker host, everything was working fine. Went to bed, woke up, was fine. Updated from 2024.04.01 to .02 and… I got the exact same result? (Note that I also was running 2024.04.02 on the new host I setup last night, I just realized).

Tried rolling back to 2024.04.01 and… stayed broken? So now ALL my HA instanced are in a broken state :frowning:

When you tarred up your backup, did you include the .config directory as well?

Typically I use rsync -avh [source] [dest] when moving hosts.

Indeed, I did. I grabbed the entire docker volume, including all hidden files, with permissions intact.

Though like I said, things have gotten weirder now. I updated the known good container on the original host to 4.02 and I have the SAME issue. NONE of my integrations are showing in the UI or loading (but they ARE being refernced as “stranger danger” integrations in the log file and showing up as info warnings as one would expect them to on a normal startup, so its seeing them, so SOME degree. Also HACS is not showing up in the left hand side bar or loading either.

This leads me to think that my config file isn’t being loaded right, but well enough that it can start? However I turned on debugging and I can’t find any useful breadcrumbs.

That is odd. So, at any point did you have both of them running at the same time? I kinda wonder if maybe your configuration.yaml (or maybe your .config directory) might have gone corrupt at some point? Do you have a backup you can pull a copy out of and test it on one of the systems?

I’ve seen a couple other people post about missing integration after upgrading and wonder if a simple full reboot of the system would help that. Honestly, I’m not sure and I’ve not had it happen to me.

Did you check file permissions?

Errors in logs?

So I fixed it, and I can recreate the issue 100% of the time on command, but haven’t quite understood WHY.

So, there is a media: directive in my config file. If the docker volume mount to my NFS share of music isn’t up, then the config file will throw up over the bad media: entry. Once it borks over that, the contents of .storage seemingly become corrupted? Or at least, in a way that the system won’t load the contents. It will throw an error over that entry line but load HA in “safe mode”, until I fix it.

From that moment forward, even if I comment out the media: entry or fix the mount, the system will load fine and run, but will not load ANY custom components, integration configurations, HACS, or anything else “non standard”.

If I blow away the .storage folder, and copy it back over again from the backup, and pre-comment out the media: entry in config OR 100% triple ensure the nfs volume is up and working, then it will load just fine.

No idea why that is, but, well… I consider this fixed /solved at least.