Can anyone help me to a direction where is described how to move the database to an external device for example an usb stick or usb harddrive? I’m running HASS on a Raspberry Pi4b and are not familiar with Linux so a detailed description is preferred.
I would like to know that, too
Have you guys seen this?
I am about to give this a try and shift the dbs to my Synology NAS
So how do you move it to a flash drive?
- Make sure your drive is connected and visible to HA (depends on the way you operate HA: with HAOS it’s very easy) and the file system is correct
- Edit configuration.yaml according to the recorder integration details linked above. Use
db_url
, where the default would bedb_url: sqlite:////home/user/.homeassistant/config/home-assistant_v2.db
If you don’t want to move only the database but the whole data (and more), stick to Common Tasks - Operating System - Home Assistant.
I believe I’ve cracked this issue for use with Raspberry Pi and now have Hassio running on a MicroSD with the sqlite database stored separately on a local USB drive!
For those interested in reproducing the solution I took, please see my longer comment (#25) on Home Assistant community blog post “Save DB on USB stick/drive (Hassio).”
I hope this information helps others!
Ben
Thanks for this!!! How different would the process be to move to an NVMe drive (e.g., when one is installed in the Home Assistant Yellow)? Are the mount points for this type of drive set in the same manner as for a USB drive?