Skip to content
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

User configurable backup filename #112443

Closed
jamesgeddes opened this issue Mar 5, 2024 · 6 comments
Closed

User configurable backup filename #112443

jamesgeddes opened this issue Mar 5, 2024 · 6 comments

Comments

@jamesgeddes
Copy link

jamesgeddes commented Mar 5, 2024

The problem

The backup service currently provides the user with the option to configure a name.

Counterintuitively, this does not set the filename. Even when the name is set, the backup file is seemingly given a random string as a filename, such as,

  • 969fad88.tar
  • a1467f82.tar
  • 70344a3d.tar

According to community members, it is not currently possible to set the file name. This limitation poses several challenges for users who rely on backup management systems or external services for storage and versioning.

Use cases

  • AWS S3 Integration: AWS S3, a commonly used cloud storage service, relies on consistent filenames for accurate versioning and retrieval of backup files. Enabling customizable filenames in Home Assistant would enhance compatibility with AWS S3 and similar services, ensuring seamless integration and reliable backup management.
  • Backup System Compatibility: Various backup solutions, including rsync, BorgBackup, and Synology Hyper Backup, require filenames to adhere to specific formats for effective backup management and versioning. Allowing users to configure filenames in Home Assistant would facilitate seamless integration with these backup systems, enhancing overall backup efficiency and reliability.

Proposed Solution

Allow users to customize backup filenames according to their preferences. Add a filename attribute to the backup service configuration parameters, providing users with options to specify naming conventions, include timestamps, or incorporate unique identifiers.

What version of Home Assistant Core has the issue?

core-2024.2.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Home Assistant Supervisor: Create a full backup.

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

service: hassio.backup_full
metadata: {}
data:
  compressed: true
  location: nas
  name: habak

Anything in the logs that might be useful for us?

No response

Additional information

For context, my own daily backup process is as follows.

  1. 0100: Output home assistant full backup to NAS
  2. 0400: NAS backs up to AWS S3

With every backup getting a unique filename, it is not possible to use the AWS S3 built-in versioning capabilities. I will instead have to write a script that deletes the old backups from the NAS.

If I was able to set a consistent filename, new backups would overwrite the previous backup, which would ensure that

  • my NAS does not fill up with old backup files.
  • AWS S3 sees a new version of the same file.

I will gladly take this ticket if someone is able to,

  • assign it to me.
  • point me in the right direction!

First reported by Tankegroda on 2020-04-03 in forum thread Snapshot naming + Filename. Issue persists. I could not find a ticket here so apologies in advance if this is a duplicate.

@joostlek
Copy link
Member

joostlek commented Mar 5, 2024

Please report this at the supervisor repository

@joostlek joostlek closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2024
@jamesgeddes
Copy link
Author

jamesgeddes commented Mar 7, 2024

@joostlek Are you not able to simply move this ticket to that repo?

@joostlek
Copy link
Member

joostlek commented Mar 7, 2024

Nope, don't have the rights to

@jamesgeddes
Copy link
Author

Ah fair enough. Would be good if more people were given the rights to do that as it would be more efficient 😄 Will re-log now. Thanks

@jamesgeddes
Copy link
Author

Logged supervisor#4947

@joostlek
Copy link
Member

joostlek commented Mar 7, 2024

And we usually don't like moving issues as different repositories have different issue templates, so although we can move them, they might miss information in other repositories. (For example if this was a frontend issue, it would miss the browser used and the OS you are running)

(Also FYI: The reason I sent you to there is because it looks like we do pass the name on to the supervisor doing the backup, so I assume its a bug in the supervisor)

@github-actions github-actions bot locked and limited conversation to collaborators Apr 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants