Moving venv


Had this running on Fedora for a while, and an OS upgrade means the system has a new Python version. The old venv seems to want the old Python version.

I did a load of searching and it seems far from straight forward to update a venv to use the new Python version.

So I had a go at following the docs to just make a new one. All the config is in /home/homeassistant? Is there anything in /opt/homeassistant that I need? I saw some files that look like they’re to do with zwave config so wouldn’t want to lose those.

This would be a good question if I wanted to move this to a new machine as well, or create a back up?

Keep a backup just in case, but everything should be in /home/homeassistant.

Since your moving machines too, just start the venv from scratch and then you can relink it to the config folder during setup.

The main thing is to back up your config directory - everything for Home Assistant will be in there - and you can just point to it from your new venv.

All your config will be in /home/homeassistant/.homeassistant - that’s what you should already be backing up, and the folder you’ll need to copy (including all the hidden files and folders) to a new machine if you were migrating.

Upgrading the venv is pretty simple. I’ve done it many times already, though I do it by building a new one and then switching over. That way if I mess something up it’s trivial to revert.