Migrate HA to new system

I’m ready to move HA to a new system, and am wondering what the best way to do this is.

What files in particular do I need to move?

  • All of the YAML Files
  • Any .conf files (like Ecobee.conf)
  • .storage directory?

Or can I just rcp the entire homeassistant directory, including .storage minus *.log, *.db?

It’ll be easy to try, but before I do, I’d like to see if someone has already done it successfully.

Thanks!

3 Likes

Take a snapshot
Install hassio on the new machine
Restore the snapshot

Done.

Literally that simple.

I’m using https://github.com/sabeechen/hassio-google-drive-backup to manage my snapshots, so I installed that to get the snapshot onto the new system as well.

4 Likes

Thanks. This is a docker install, not the hass.io version.

2 Likes

Did you figure out the best way to do this? I also want to migrate my Docker install to a new host

I copied the configuration, yaml and .storage folder, and restarted the container on the new host. I needed to update my SmartThings token, but besides this, it was pretty painless. Good luck!

3 Likes

Since you’re migrating, consider this: tribut/homeassistant-docker-venv: Run Home Assistant as non-root using the official docker image (github.com)

HA runs as root, which is insecure. It beats me why this is still not fixed in the official distribution.

Has anyone done the above but also using a git pull integration to update config files?
how does the git repo move across? does it all come with the snapshot?

Does this HASSIO-Google backup migration method automatically install add-ons / integrations? Or is it necessary to install those in advance to new system and then make “restore” in a new system? I am using integrations/add-ons like z-wave MQTT and Mosquito mqtt.

edit:typo

Hi just did a migration on an ubuntu docker supervisor to a second ubuntu machine and yes the addons are automatically installed.
The ip adress stays as the one set up before migration on the destination computer
I’m just moved across my zigbee and zwave dongles and everything just works including mqtt
nabu casa alexa integration and alexa media integrations and my bravia tv custom remote all worked without any reconfiguration

3 Likes

Word of warning. Be patient (The database can take a while to rebuild) and just restart if something is missing or not working.
Also clear you webbrowser cache.

2 Likes

yes it took about 10 mins to update

Wow my experience was completely different.

I have read in many places the simplicity of this - full backup - new system - restore and wait a little. Everything seems to say it’s super easy, but it didn’t work for me and I’ve spent too much time trying to make it work so I’m back on my old system until I can sort out these issues.

They’re all ADD ON related, and it might be due to the RaspPi ARM → x86 PC migration change in the hardware, which is understandable.

  1. SSH terminal - I can’t get this going no matter what I try. Uninstall, reinstall, start (doesn’t work) logs basically show an error. Looking around for how to fix this.
    [13:27:06] WARNING: SSH port is disabled. Prevent start of SSH server.

  2. Studio Console Server - probably the same issue with the arch change but again, uninstall, reinstall, etc, restart system, nothing fixes it. The log isn’t clear what’s wrong:

[2023-02-04T21:39:16.520Z] info  Wrote default config file to ~/.config/code-server/config.yaml
[2023-02-04T21:39:17.528Z] info  code-server 4.9.1 f7989a4dfcf21085e52157a01924d79d708bcc05
[2023-02-04T21:39:17.531Z] info  Using user-data-dir /data/vscode
[2023-02-04T21:39:17.563Z] info  Using config file ~/.config/code-server/config.yaml
[2023-02-04T21:39:17.563Z] info  HTTP server listening on http://0.0.0.0:1337/ 
[2023-02-04T21:39:17.563Z] info    - Authentication is disabled 
[2023-02-04T21:39:17.563Z] info    - Not serving HTTPS 
  1. The biggest issue is the Z-wave JS add on – again for the life of me I uninstall/reinstall and then try to start it - it doesn’t seem to want to start. I don’t know if it’s a good idea to uninstall / reinstall because I have z-wave devices/entities but I was just trying to get something working. No dice here. Errors look like:
2023-02-04T21:33:15.871Z CNTRLR   [Node 005] Interview stage completed: CommandClasses
2023-02-04T21:33:15.871Z CNTRLR   [Node 005] Interview stage completed: OverwriteConfig
2023-02-04T21:33:15.872Z CNTRLR   [Node 005] Interview completed
2023-02-04T21:33:15.872Z CNTRLR   [Node 005] The node is ready to be used
2023-02-04T21:33:15.874Z CNTRLR » [Node 005] Assigning SUC return route...
New client
Client disconnected
Code 1000: 

And the add on never starts but it might be something to do with the configuration - I’m not sure. I don’t know if it’s an arch thing or something else.

So I’ve got some digging around to do but I guess I was one of the unlucky ones since it didn’t work for me. I’m sure it’s related to the architecture change but I was hoping that would be an easy fix.

2 Likes

Is there a reason why HomeAssistant is only for Tesla Engineers and Rocket Scientists?

In laymen terms how does one restore a backup?

There is no restore option anymore when starting from scratch.

1 Like

In HA, go to Settings → System → Backups.

Click the 3 dots at the top right and select Upload Backup.

I agree, a button would have been nice. :slight_smile:

2 Likes

There is also an option right on the onboarding screen to upload an existing backup.

“HA” as in, ‘Ha ha, good luck!’

Where?

Are you sure?

You need to put the copy of your backup in the backup folder first for it to show up there.

Potentially helpful would be an option, anywhere, to restore from a backup.

The verbs I associate directly with backups are take, make, backup, and restore. I don’t believe I’ve seen any other UI refer to the act of restoring something from a backup as the uploading of a file that contains the result of the earlier backup action.

I suspect that if I had come across the upload action in Home Assistant’s UI prior to reading this thread, I would have assumed that it meant the uploading of a backup from Home Assistant to some remote artifact storage system, not the uploading from my web browser to Home Assistant with the implication that Home Assistant would then, without further action on my part, use the uploaded backup to perform a restore action.