thomasmauerer / hassio-addons

My collection of addons for Home Assistant
MIT License
467 stars 53 forks source link

Ignore manual backups via "keep x" #139

Open cpohli opened 1 year ago

cpohli commented 1 year ago

This is not a real issue, more of a feature request (sorry, if this is not the right place for this):

I really like the ease of use of this plugin, thanks for this. It's functioning perfect in my case and does exactly what it's supposed to do. :-)

I like an option though: Would it be possible to get an option to ignore backups that are not made by samba backup? **Perhaps the "keep x" could simply ignore all backups, that are not named samba_backup*** (or the name scheme defined in the config).

Background: I do sometimes make backups that i would like to keep in HA. Sometimes it's only a core update, that i like to linger around. But all that is deleted, if i define a "keep x".

Thanks for consideration.

thomasmauerer commented 1 year ago

Unfortunately, I do not see a generic way which would work reliable. The names are customizable and do not necessarily have to start with "Samba Backup". Apart from that they can always be overwritten when using a manual trigger.

I know it's not trivial, but if the names are always the same on your specific setup, you could set the keep_local option to all and implement your own cleanup logic with automations/scripts/etc.