-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make backup file names more user friendly #136928
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
thecode
reviewed
Jan 30, 2025
joostlek
approved these changes
Jan 30, 2025
agners
reviewed
Jan 30, 2025
Fixes #136920 |
Closed
8 tasks
balloob
approved these changes
Jan 31, 2025
abmantis
reviewed
Jan 31, 2025
19 tasks
balloob
pushed a commit
that referenced
this pull request
Jan 31, 2025
* Make backup file names more user friendly * Strip backup name * Strip backup name * Underscores
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
by-code-owner
cherry-picked
cla-signed
has-tests
integration: backup
new-feature
Quality Scale: internal
small-pr
PRs with less than 30 lines.
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.
Breaking change
This may be a breaking change in cases where automations rely on backup files being named
{backup_id}.tar
Proposed change
Make backup file names more user friendly
Without this PR, backups are named
{backup_id}.tar
.The PR proposes to change the naming to
{name}_-_{date}_{hh.mm}_{xxxxxxxx}.tar
, for exampleCustom_backup_2025.1.0_-_2025-01-30_05.42_12345678.tar
.Considered alternative naming schemes:
Custom backup 2025.1.0 - 2025-01-30 05:42 12345678.tar
. This has been ruled out because colons are forbidden by Windows file systemsCustom backup 2025.1.0 - 2025-01-30 05.42 12345678.tar
. This has been ruled out to allow broken shell scripts which don't quote file names to work.Note that the last part of the filename,
12345678
in the example, is NOT the same as thebackup_id
. In this PR, the last part of the filename is seconds + microseconds, but that's subject to change and should not be relied on.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: