I want to move my Home assistant installation to another server. I have installed Hass.io in Docker which is running in Ubuntu, but i’m unsure what to copy to the other server (Also Ubuntu) to do it as painless as possible.
Did this actually work for you? It seems like it should work…but it didn’t for me. I currently have it running from the docker container on 1 machine, I stopped the container, copied everything in the dir mounted at /config to the new machine, started up the same docker image on the new machine…and then when I connect to it via a webbrowser it prompts me to create an account (like a brand new install)…if I actually try to make an account it fails with python errors in the logs…I’m surprised…and a little stumped
Had to reinstall my raspberry pi, as I had some issues with hardware. Luckily I have pushed my homeassistant project to github before. However after pulling my /config dir, with configuration, automations, customizations and so on and restarting my homeassistant container, I was prompet to create a new account. After that I was looking at an empty homeassistant. No lovelace, no hacs.
It’s ok to set it up again as it’s not that difficult, but it’s a lot of work. If there is a safe way to copy the config to another server I’d like to now, as I am sure I have to to it again some point in the future.
Ok, copying .storage seemed to have fixed it for me.
My repository was public, so i did not push .storage and secrets.yaml. Stopping the container, copying the missing files and restarting the container fixed it for me. Hacs, my lovelace and all integrations are back.
Just in case anyone comes across this like I did wondering why it wasn’t working after copying the config directory over…
This was indeed the key when I couldn’t figure out why copying my config hadn’t worked. The key point is everything… There is a hidden directory in config that wont be copied using cp. Make sure you include the hidden directory
official documentation for this would be great… I copied my directory over to the other machine and checked that I have exactly the same number of files in both folders with find . -type f | wc -l on both machines. Still, after docker compose up -d I’m greeted with the onboarding screen.