Backup without data history?

Hello, I am searching for way to backup my HA configuration (in case my RPi with sdcard fails). Currently I use snapshots, but recently they are several GB’s. Is there a way for backup just configuration so it can be easily moved/restored to another device, without data history probably? Note: I use RPI + debian + docker and then HA inside, it is not HA core os, but anyway snapshots create and restore works, just want to reduce the size of it .

Hi Hrvoje, welcome to the HA forum!

Just move your database to a separate folder and run a partial backup, excluding that folder. This is what I do.

recorder:
  db_url: sqlite:////config/database/home-assistant_v2.db

Then exclude that config/database folder in your snapshot.

2 Likes

I am new to HA, and still unsure what exactly is in database, and if some configs are maybe there. Maybe new feature request, when creating snapshost, which can be partial, to have checkbox “backup also data history/database” would be nice? :stuck_out_tongue:

The database is purely your sensor / state history. There is no config in there to worry about losing.

The only way to exclude it from the snapshot (as far as I know) is to have it in a separate folder and exclude that folder. Same end result but an extra ‘config’ to get you there.