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.
Has anybody tried this?
Everything under your config directory should do it.
Keep your current setup to begin with.
Install hassio on the new machine.
Transfer everything in your config directory to the new machine, something like (on the old machine)
rsync -avPp /dir/config/is/in/ newcomputername:/dir/donfig/is/in
Make sure the new setup works OK.
Thanks, that sounds less complicated than I had feared
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
Watching as I have the same proble.
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.
Yes you need everything from /config/
Pretty obvious really.
Where is this folder located?
under config. For the clocation of config, see
Thank you for this, worked great for me today!
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.
Same here using the same docker image and copying all the /config files, even the hidden ones…
And in the startup log I can see that is reading all the devices and integrations… but still shows me the onboard screen.
EDIT: when I created a user with the same name in the onboard, once inside home assistant everything was OK, so everything worked