Recorder db_url for sqlite doesn't work - relocating database file

hello,

I’m new to this forum.
and newbi to homeassistant too.

my configuration is:

  • a base board with a raspberry pi CM5 board, with 32GB of eMMC flash and 8GB of sdram
  • raspbian os installed on the embedded flash
  • homeassistant 2025.3.4 installed in a docker
  • Mosqitto installed
    the database is SQLite, and I would like to relocate the db file on another media, I saw that this is possible by adding a ‘recorder:’ section in the configuration.yaml.

However, I tried a lot of combinations for db_url, but nothing seems to be working.
I also tried to put the recorder section in a secrets.yaml file.
to proceed with some tests, I have made a copy of the home-assistant_V2.db file to /home/jlsun folder.

at this time the database has a size of 2MB (a few events recorded, I started the MQTT connection to a device yesterday)

this is what should normally work (I saw many examples all arround, it seems that 4 slashes are needed)

even when using the original location
(/home/jlsun/Homeassist/home-assistant_v2.db)
it does not work (HA gives a message at restart and SQLite temporary files are not created)

Can someone help me, I didn’t find anything in many places on the web, looked into this forum too, the only approaching thread here is from 2016 and I saw the same recommended syntax, it should work but mine does not.

the definitive db_url will be on a usb sdcard (‘disk’ on the screenshot)

I have a french version of HA.
could it be a text encoding problem for HA to manage the db_url string ?
or something to do with HA docker ?

thanks in advance

Hello,

As you are using the brand new CM5, you don’t need the eMMC flash or any other SD card. Why not use a single 1TB NVMe key for all your data. NVMe keys have an internal controller to relocate data and avoid wearing. Just purchase a single NVMe key and go NVMe.

Hello,
I finally installed MariaDB on my Raspberry and relocated the database on an SDcard for testing, it works fine.

I will purchase an NMVe card soon, and will host the database on it.
I prefer keeping the OS embedded in the CM5, leaving just the data on the external media, which I can remove, replace, resize, backup, archive without having to touch the OS.

I will not use SQLite until the bug is fixed, but I think that I will stay working with MySQL.