Perstidence data lifetime


i can’t find any informations how long data of persistent items will stored in database.

i’m looking a for a solution to store all data only for one month.

Regards, Web

1 Like

OH doesn’t control that. Your choices are:

  1. MapDB which only stores the most recent value
  2. rrd4j which only stores numbers but as data gets older it replaces a group of values with their average and it keeps the size of the database in terms of disk space used constant
  3. Use any other database and configure that database to clear out the old data or run scripts to clear out the older data

I do know that InfluxDB has the concept of retention policies that can be configured appropriately to delete data older than a month, but all of this will be outside the scope of OH. There is some discussion of that on the famous Influx+Grafana tutorial post.

Okay thanks.

i try to solve it with a sql script.

Regards, Web