Allow home assistant backups to exclude database #4591
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed change
Recent releases of Home Assistant have improved the default database option to the point where its performance has surpassed that of the MariaDB add-on in most if not all cases. In addition to fixing the consistency issues created by backups.
One of the remaining reasons given by users for continuing to use the add-on over the default option is inability to exclude the often quite large database file from their backups, whereas an add-on can easily be excluded. This PR adds an option to exclude the database file when making a backup of Home Assistant. It also includes a new setting which allows the database to be excluded by default to handle times when there's no space for options (like the partial backup on update).
Limitation - it only works for the default database file. Users can move or rename this file using the database options, if they do so it will not be excluded as supervisor does not look at or understand Home Assistant config.
Type of change
Additional information
Checklist
black --fast supervisor tests
)If API endpoints of add-on configuration are added/changed: