Migration from Core to Container Migration Issues

I’m on a Rpi4 and I’m trying to migrate from core to container. This is because core has gotten messy with upgrading to the newer HA versions and it seems like container should work better with that. I run a bunch of stuff on my RPI and docker will make this cleaner.

My process has been

  1. Shutdown core & restart my machine to ensure its not running
  2. Follow the installation instructions for container (I’ve tried both with portainer, and with vanilla docker)
  3. Copy over my whole config directory from my old installation
  4. Turn on the docker container & goto the website

The issue is that no matter what I seem to do the container presents me with an onboarding page as if I have no pre-existing data in my HA install. (I’m upgrading from 2022.7.6)

I’ve tried to start with a docker image of the same version 2022.7.6, and with the newest.

I’ve tried changing my ports to see if there are issues with multiple things running. The only port that is available is the one with my docker install.

It seems like its not pulling from my old config but if i look in the docker logs its clearly pulling from my old data. I see things in the log like “2022-11-13 02:41:24 INFO (MainThread) [homeassistant.components.automation.half_bath_fan_auto_off_2] Initialized trigger Half Bath Fan Auto Off”.

I’ve also setup the onboarding process with a new account. Turned off docker and turned it back on. Was able to login with the temp account. Then i’ve turned it off and deleted the config directory and when i turn it on again i’m presented with onboarding again. (This means the directory i’m pointing to is correct and docker can access it).

So, my config is getting loaded / my files are ported over… but for the life of me my container won’t update the web UI with the install.

My inclination is that this is some sort of permission issue but when I’ve copied my files over i’ve tried to chown them. I’ve also tried to chmod 777 them temporarily with no change.

Here is my docker config. Note i’ve also tried to omit this USER_ID / GROUP_ID (which is for the PI account).

docker run -d \
  --name homeassistant \
  --privileged \
  --restart=unless-stopped \
  --device /dev/ttyUSB0:/dev/ttyUSB0 \
  --device /dev/ttyUSB1:/dev/ttyUSB1 \
  -e TZ=America/New_York \
  -e USER_ID=1000 \
  -e GROUP_ID=1000 \
  -v /home/pi/docker_files/homeassistant_docker:/config \
  --network=host \
  ghcr.io/home-assistant/home-assistant:stable

Any thoughts as to what i might be experiencing here? Thank you!

It was a simple mistake oops. I copied but didn’t copy everything facepalm

solved by using “cp -a” instead of “cp -R”

specifically i navigated to my new directory and entered

sudo cp -a /home/homeassistant/.homeassistant/. . 

Thank you! I was trying for hours and made the same mistake.