How do I migrate my configuration from Docker to a VM?

Hi,

Just decided to migrate from Docker to a full VM, using Hyper-V. I’ve had a look around but I could’t find any information on how to import my configuration. Would appreciate any tips on how to go about this.

Thanks,
Alex

Best is:
supervisor - snapshot

download via samba, upload to new hass via samba

supervisor restore from snapshot.

Which, if you’re using Docker, isn’t an option since there’s no Supervisor :wink:

If you copy over the entire configuration folder, including all the “hidden” files and folders (including those starting with . which are hidden from view by default) then you’ll have your entire configuration.

I’ve got my config folder from docker but how do I copy that into the VM?

OP just said he uses docker, he didn’t say if it is supervised or not :slightly_smiling_face:

@Alex_Cheng
What installation type did you use? You can see it under Configuration -> Info there’s a field called “installation_type” in the system health section.

There’s a bunch of options, usually the easiest is to be running Samba, and then you can copy and paste. If you do that ensure that you pick the option to Show hidden files in your file browser.

Home Assistant Container - don’t think there is a supervised option

Then your are not running supervised, do as Tinkerer suggested :slightly_smiling_face:

All sorted.

So I had to enable Samba by installing and configuring the module via Supervisor.
Stop the Core
Copy my config across
Restart the Core

1 Like

Got my Blue today and want to copy the config-folder from docker installation.Thought about shutting down core and have samba still active or something else.

But how to stop core, so that the files are not in use and I can replace them? Possible in UI? I didn’t find an option for this or for the steps Alex described.

Why not make a snapshot and restore that?

Probably because only HAOS and Supervised have snapshots…

If you’ve got Advanced mode enabled in your user profile it should show in Configuration → Server controls

1 Like

Great. Thank you. Thought it somewhere in Supervisor menu, where I can stop and start again the different parts of the OS. With stopping there, the copy was successful.

But then I have no chance to restart again via UI, haven’t I? That means remove power the option?

Don’t pull the power to any running computer.

The Supervisor menu has options for restarting the host. Server controls has options to restart and stop HA itself.

Server Management - Stop

See the above image as mentioned by Tinkerer.
It should be placed under “Check Configuration” button.

Apparently, he actually has supervised or HassOS as he has a supervisor menu.
So I guess snapshots are indeed the easiest way.

“Docker installation” doesn’t tell much, as 3 out of 4 installation method use docker (and the people using core/venv tend to not ask this kind of questions :wink: )

Yes, but if stoipped, the UI is not reachable anymore. My question was, how to start again after pressing the stop button.

And yes, forgive my mistake in my first post above. I came from only-core docker without supervisor.

So you don’t have a supervisor menu, right?
FWIW, “only-core docker” is called a Container installation.

Then the migration path would be to stop your container and, assuming you followed the steps of the container installation, move the content of “/PATH_TO_YOUR_CONFIG” over to Blue after installing the samba addon on the Blue, by instance.

To migrate, you’ll want to copy everything inside /config folder. Some folder are hidden such as /config/.storage and /config/.cloud. Make sure you copy them as well.

Yes. I did this. My topic is:

If the new HAOS is running, the config-files are in use. So I thought about stopping the HA server, so that the files are not in usage anymore. Then copy via samba. And the restarting the core.

Then Tinkerer pointed me to Configuration - Server controls - stop. Fine. Stopped. share still reachable via samba. Copied the old stuff.

But then is still my question: How to start the HA server again, as the UI is not there anymore after stoipping in Configuration - Server controls - stop.