-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Improve hassio backup create and restore parameter checks #134434
Conversation
Hey there @home-assistant/supervisor, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
cb3eea0
to
76ed3ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now the PR LGTM is fine as it reflects Supervisor's capability.
if ( | ||
backup | ||
and restore_homeassistant | ||
and restore_database != backup.database_included |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, this implements what you write here:
It's not possible to restore database from a backup which doesn't have database or not restore the database from a backup which has database
and from what I understand what Supervisor is capable of today, correct?
IMHO, not restoring the data should be possible, but there is the concern what if this is a downgrade of Home Assistant Core, and the (currently newer) database is not compatible? 🤔 The Core will complain on startup, so it is "safe", but the outcome might not be what the user expect (since he presumably wants to continue with the current database).
When no database is part of the backup, the user can already run into this situation, so we are a bit inconsistent in what we allow today 😢
Proposed change
Improve hassio backup create and restore parameter checks:
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: