Automatic cleaning of the database before a backup is performed

To maintain a backup with a clean database, the database should be automatically purged before the backup process:

  • Automatic database purging before backup
  • Automatic purging should be configurable as an option

This already occurs with the new backup system. The backup occurs after the nightly purge.

1 Like

The cleaning of the database occurs at a hard-coded time. Only then is the backup performed with a clean database – also at a hard-coded time. At that time, my NAS is shut down to save power. For this reason, I would like:

  1. the ability to set the time when the backup is executed,
  2. for the database to be cleaned immediately before the backup is performed, which should be an optional feature,
  3. for a manual backup option to be provided that allows cleaning the database before the backup.

This could be made configurable, for example, with a checkbox in the dialogs. If checked, Home Assistant should save the settings separately for automatic and manual backups.