Home-assistant_v2. dB more than 4Gb?

Hi, was just surprised when I checked the size of my last snapshot, around 1Gb. Then I checked the db file Home-assistant_v2.db that was 4354544.0KIB, seems enormous. Any option to clean or optimize it?

The is my recorder set up, I stole it from someone a long time ago. You can customize this to suit your needs.

recorder:
  purge_keep_days: 7
  include:
    domains:
      - sensor
      - binary_sensor
      - switch
      - light
      - device_tracker
      - vacuum
      - group
      - input_boolean
      - cover
      - person
      - counter
      - timer
      - climate
  exclude:
    event_types:
      - service_removed
      - service_executed
      - platform_discovered
      - homeassistant_start
      - homeassistant_stop
      - feedreader
      - service_registered
      - call_service
      - component_loaded
      - logbook_entry
      - system_log_event
      - automation_triggered
      - script_started
      - timer_out_of_sync
1 Like

Thanks, will do that. Did you also tried the parameter
repack: true?
Edit: it works well, thanks, size reduced to 436Mb.

1 Like