# Recorder

> The integration that stores the history of states and events in a database.

Source: https://contributors.home-assistant.io/glossary/recorder/

- In code: `recorder`, `home-assistant_v2.db`
- Also: database

History graphs, the logbook, and long-term statistics all read from the recorder's database. By default, it keeps ten days of history.

## Related terms

- [Long-term statistics](https://contributors.home-assistant.io/glossary/statistics/): Hourly summaries of sensor values, like the mean, minimum, and maximum, or a running total, that the recorder keeps for good, for graphs over long periods and the energy dashboard.
- [State](https://contributors.home-assistant.io/glossary/state/): The current value of an entity, like `on`, `21.5`, or `playing`, together with its attributes.
- [Event](https://contributors.home-assistant.io/glossary/event/): A message on the event bus that something happened, like a state change or a button press. Any code can listen to events.
