2024年11月24日星期日 上午10:39:40

Home Assistant: upgrade-backup old home assistant core and Install new home assistant core

2 年 前
#18761 引用
Home Assistant: upgrade

https://iotechonline.com/home-assistant-upgrade-to-python-3-8/?cn-reloaded=1&cn-reloaded=1
0
2 年 前
#18762 引用
Sometimes you have the need to build a new Home Assistant installation and restore your old configuration. Maybe your SD card died, or you want to migrate Home Assistant to a more powerful server.  In fact, you can even do cross-platform migrations (e.g. from a Raspberry Pi 4 to a Proxmox VM on an Intel processor) seamlessly. That’s pretty cool.

Home Assistant has a built-in backup and restore functionality, but it’s not super polished. So you might run into issues or headaches so this post attempts to cover various restore options and some lessons learned.

This post focuses on Home Assistant OS (HAOS), which is a fully managed solution for Home Assistant. This is different from Supervised (you provide your own OS), container, and other options. Those solutions would have a different restore workflow.

https://www.derekseaman.com/2023/04/home-assistant-pt-3-restoring-your-configuration.html
0
2 年 前
#18763 引用
1
0
2 年 前
#18764 引用
1
0
2 年 前
#18765 引用
backup old home assistant and Install new home assistant




# stop home assistant and related services
sudo service hass stop
# cd into /srv directory
cd /srv/
# move your old virtualenv folder and create an empty new one
sudo mv homeassistant homeassistant.3.7
sudo mkdir homeassistant
# assign necessary permissions
sudo chown homeassistant:homeassistant homeassistant
# become homeassistant user and cd into your new created directory
sudo -u homeassistant -H -s
cd /srv/homeassistant
# create your new virtual environmet in the current folder
# with the new python version you compiled before
python3.8 -m venv .
# activate the new viltual environment
source bin/activate
# install necesary python module and homeassistant
python3 -m pip install wheel
pip3 install homeassistant
# exit the virtual environment and
# start home assistant and check logs for errors
deactivate
sudo service hass start
# check logs


Home Assistant: upgrade to Python 3.8
https://iotechonline.com/home-assistant-upgrade-to-python-3-8/
0
2 年 前
#18766 引用
1
0
2 年 前
#18767 引用
Home Assistant Rollback


# stop home assistant and related services
sudo service hass stop
# cd into /srv directory
cd /srv/
# move the failed venv and restore the old one
sudo mv homeassistant homeassistant.bad
sudo mv homeassistant.3.7 homeassistant
# start home assistant
sudo service hass start
0
1 年 前
#22454 引用
move from Home Assistant Core to Home Assistant Operating System

I would like to move from Home Assistant Core to Home Assistant Operating System and keep all of my previous setup. Will copying the .homeassistant folder be enough? Or will I have to copy other folders?

As long as you copy all the hidden files and folders in there you’ll have everything.
That is just your home assistant configuration.

Backup your /config directory, including the hidden folders under /config. Restore in the /config directory of the new installation.

opy the hidden folders under /config (.storage, .cloud, .vscode )

0
1 年 前
#22466 引用
20230928 - upgrade  from Home Assistnant Core 2022.11.2 to Assistant Core 2023.9.3

step 1:update debian 11 to debian 12

step 2:install Assistant Core 2023.9.3

cd /srv

rm -rf homeassistant20221103


# stop home assistant and related services
sudo service hass stop
# cd into /srv directory
cd /srv/
# move your old virtualenv folder and create an empty new one
rm -rf homeassistant20221103
#create a directory for the installation of Home Assistant Core
sudo mkdir /srv/homeassistant20221103
# assign necessary permissions
sudo chown homeassistant20221103:homeassistant20221103 /srv/homeassistant20221103
# become homeassistant user and cd into your new created directory
sudo -u homeassistant20221103 -H -s
cd //srv/homeassistant20221103
# create your new virtual environmet in the current folder
# with the new python version you compiled before
python3.11 -m venv .
# activate the new viltual environment
source bin/activate
# install necesary python module and homeassistant
python3 -m pip install wheel
pip3 install homeassistant==2023.9.3
# exit the virtual environment and
# start home assistant and check logs for errors
deactivate
sudo service hass start
# check logs


source:https://iotechonline.com/home-assistant-upgrade-to-python-3-8/?cn-reloaded=1&cn-reloaded=1
0
1 年 前
#22467 引用
System information


Version  core-2023.9.3
Installation Type  Home Assistant Core
Development  false
Supervisor  false
Docker  false
User  homeassistant20230903
Virtual Environment  true
Python Version  3.11.5
Operating System Family  Linux
Operating System Version  6.1.53-v7+
CPU Architecture  armv7l
Timezone  Asia/Shanghai
Configuration Directory  /home/homeassistant20230903/.homeassistant
Home Assistant Cloud
Logged In  false
Reach Certificate Server  ok
Reach Authentication Server  ok
Reach Home Assistant Cloud  ok
Dashboards
Dashboards  1
Resources  0
Mode  auto-gen
Recorder
Oldest Run Start Time  September 26, 2023 at 8:14 PM
Current Run Start Time  September 29, 2023 at 8:21 AM
Estimated Database Size (MiB)  0.27 MiB
Database Engine  sqlite
Database Version  3.40.1


0