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 #4947

Open
jamesgeddes opened this issue Mar 7, 2024 · 19 comments
Open

User configurable backup filename #4947

jamesgeddes opened this issue Mar 7, 2024 · 19 comments
Labels

Comments

@jamesgeddes
Copy link

jamesgeddes commented Mar 7, 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

I assume it is random because it seems unlikely that these are hex dates;

  • 969fad88 = 2050-01-29T05:30:48
  • a1467f82 = 2055-09-28T13:45:38
  • 70344a3d = 2029-08-29T21:44:29

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.

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.

@Alex-joomla
Copy link

This would be so great, if it gets fixed, but I'm not sure if it's really a bug :-/

@kinghat
Copy link

kinghat commented Apr 5, 2024

configurable backup filenames would be awesome but a good first step would be to have the filenames match the frontend. if i want to pull the backups i have no idea what they are other than their date.

@jamesgeddes
Copy link
Author

jamesgeddes commented Apr 5, 2024

@Alex-joomla

I'm not sure if it's really a bug

I appreciate that this is perhaps in the grey area between feature request and a bug. If one were to view it strictly from the perspective of the original feature specification to create backups, then if it is working as intended, then this would indeed be a feature request. If, however, we were to take user expectations into account, most users would expect that a name field should set a file name, which it does not. From that perspective, it is not working as an ordinary and reasonable person would expect, so it should be a bug. Either way, I am happy to be assigned to it so whether it is a feature or a bug makes no difference to me.

@kinghat

a good first step would be to have the filenames match the frontend

If I have understood you correctly, that is what I am proposing here. The name field should set the name of the file. I am told that it sets the name of the backup, but I have not seen any reference to it elsewhere in the UI. It would also be good to be able to set use placeholders to substitute values in, including but not limited to dates, times, site name etc.

Copy link

github-actions bot commented May 5, 2024

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 5, 2024
@chelming
Copy link

Still not "working" for me :)

@github-actions github-actions bot removed the stale label May 10, 2024
@jamesgeddes
Copy link
Author

jamesgeddes commented May 11, 2024

Just because an issue is old does not mean that it is not important. Stalebot is a bad idea.

I have been waiting to be assigned to this so that I can fix it - or can I just crack on with it?

Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jun 10, 2024
@chelming
Copy link

I'm still interested in being able to set backup names.

@github-actions github-actions bot removed the stale label Jun 10, 2024
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jul 10, 2024
@kinghat
Copy link

kinghat commented Jul 10, 2024

Just because an issue is old does not mean that it is not important. Stalebot is a bad idea.

I have been waiting to be assigned to this so that I can fix it - or can I just crack on with it?

please crack on with it 😅

@github-actions github-actions bot removed the stale label Jul 10, 2024
Copy link

github-actions bot commented Aug 9, 2024

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Aug 9, 2024
@chelming
Copy link

chelming commented Aug 9, 2024

still want

@github-actions github-actions bot removed the stale label Aug 9, 2024
Copy link

github-actions bot commented Sep 8, 2024

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Sep 8, 2024
@loocd
Copy link

loocd commented Sep 8, 2024

Still want this

@github-actions github-actions bot removed the stale label Sep 8, 2024
@jamesgeddes
Copy link
Author

Stale bot is annoying...

I'll get to this asap.

@Shiroe93
Copy link

+1 for this feature/bug correction
i set this up a couple of weeks ago and i assumed they would have the same name as in home assistant out of curiosity i went to check everything was okay and found this

@LupinIII
Copy link

I came here, because I was trying to find a way to set the default backup name to something useful and was quite astonished that isn't possible. At least when downloading the backup file through the UI it gets the backup's name, but it being different in HA's filesystem is definitely more on the "bug" than the "feature request" side in my opinion.
Also for my initial reason the default name (if the name field is left empty when creating a manual backup for example) really should at least follow an ISO timestamp. Having files named "20_September_2024" isn't helpful.

@vobelic
Copy link

vobelic commented Oct 5, 2024

Also came in here looking for a solution for a native way to have the actual filename customized (or at least matching the UI one as stated previously).
This really should be working out of the box.

@jamesgeddes
Copy link
Author

jamesgeddes commented Oct 27, 2024

should at least follow an ISO timestamp

ISO 8601 FTW!

Yes, when I get around to doing this (unless someone gets to it first!) I will include a timestamp option that provides an ISO8601 datetime. Then again, wouldn't the world be a much easier place if everybody could simply work in unix time 😂 while we are at it. let's also convert to decimal time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants