How do I name the backup file?

I am backing up every night at 0100 to my NAS. At 0300, my NAS backs itself up to AWS S3. I want the backup file to be named the same each time so that it overwrites the previous one. This ensures that S3 can version the file properly.

Here is my YAML.

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

As you can see, I have specified that the file should be called homeassistantbackup but it is appearing on the NAS as [random string].rar, for example, “969fad88.tar” and “a1467f82.tar”. What am I doing wrong?

Thanks!

1 Like

You aren’t doing anything wrong. You can vote here: Snapshot naming + Filename

Are you saying that the name that the user specifies is just ignored, making it impossible to name a backup file?

The name the user specifies is stored in the backup file, and shown if you list the backups in HA, but it is not the name of the file.

Well that’s a bit counterintuitive! How does one name the actual file?

You can’t. See the post of tom_l

That is unfortunate. I have upvoted the linked post. Would be great to be able to name the file so that it can be properly versioned in AWS S3.

Logged in core#112443

Please don’t open feature requests there. It is for issues (bugs) only.

I would argue that this is a bug, since it is not working as expected.

It is not a bug. It is working as it was programmed to. You want it to do something else?

That’s a feature request.

Without getting into the merits of whether this is a bug, a feature request, or neither of those, isn’t overwriting the same backup generally a bad idea?

Imagine if you misconfigured something or an update went wrong somewhere and you didn’t realise immediately. IF the auto backup triggered by the time you realised, you’d have no way of reverting.

Isn’t there some kind of retention setting in either your nas or AWS, where you could configure it to only keep x number of backup files, or retain backups only for x number of days? That seems to be a much more sensible approach and your ass would be covered if something went wrong.

We should not be dictating how people want to manage their files. All I am proposing is that we allow the user to specify a filename.

It is working in a way that a user did not expect. The name field does not set the filename. This is therefore a bug.

Others are also of the opinion that this is a bug.

That’s the user’s fault not the integration’s.

We are certainly getting off topic here. Who (ie what user) really cares whether it is a bug or a feature? That is about as important as tabs vs spaces. The point is that users should be able to set the filename of their files.

The developers do. If you open a feature request on github it will be closed and you will be redirected to the feature request category of the forums. Which was why I advised you not to do this.

As advised previously, vote here: Snapshot naming + Filename

Or, if you have the ability, submit a PR to implement the feature yourself.

It is not a feature request, it is a bug.

There is an attribute called name which appears to do nothing. The “man on the Clapham omnibus” would expect this to set the filename. It does not.

As you can see,

  • I have already upvoted on the link you mentioned.
  • I have already submitted a ticket and am awaiting assignment. Do feel free to assign me to this ticket and I’ll crack on with it.

Thought you did not want to discuss this?

Just so you are aware, this is perhaps not the most tactful way to express this. I have only seen positive interactions on the HA forums thus far, so I would have thought that moderators would be leading that culture by example.