How much history is stored and how can we limit it?

I do not see any setting where I could set how much storage do I allow for data collection. And also I don’t know what is the default?

Is there a way to limit the amount of storage it can use?

It is this setting in the recorder integration: https://www.home-assistant.io/integrations/recorder/#purge_keep_days it lists the default as 10 days.

You can also limit the amount of data stored by excluding entities you are not interested in the history of.

2 Likes

First of all thank you very much @tom_l !

Now I have follow-up questions:

  • “purging” removes all data or just the ones which are over the “keep_days” threshold?
  • Is there any way I can limit based on the disk space? (e.g. keep any days that can fit into 1GB of disk space)
  • How can I check how much space is used by my settings? (which folders/files to look for?)

Just the data older than the keep_days value.

No.

If you are using the default recorder database, check the size of config/home-assistant_v2.db

If you want to add a sensor to do this see: Add "file size" sensor to the System Monitor - #6 by duceduc

1 Like