Auto-delete backups

It would be nice to have a way to get old backups auto-deleted.

E.g., having an option to set that only the last x backups of one type are kept and the oldest ones are deleted automatically to keep the VM with HA small.

Since it gets auto-backuped with Proxmox every week the VM backup gets bigger and bigger without any extra use.

The Samba Backup add-on does this.

1 Like

So does the Google drive backup add-on.

I assume that the cleanup is only done after a backup to g-drive or smb. I would love to get the cleanup done directly after HA is doing a new backup.

Anyhow searching HA add-ons and HACS add-ons I did not find the samba nor the google backup add-on. I might be blind?

Those are great add-ons. I’ve used them both.

But I still agree this FR would be a nice addition to the native HA backup process.

Even better would be the ability to back up directly to a Samba share like a NAS. Before anyone misunderstands, those two add-ons do not create the backup on the Samba share or G-Drive. They copy it there. It matters, if you’re storage is limited or (like mine) on an SD card.

Voted.

With the new network storage options with HA v2023.6 this feature is more relevant than before. At least the SMB backup addon would become irrelevant and move into native HA functionality with a blueprint or two for automations.

4 Likes

I’ve been a long time user of the samba backup addon but am always a fan of native integrations. I moved over to native NFS supported backups.

Today I ran into this issue and I discovered when I went into my NFS drive, cleaning up the old backups actually fixed the issue and allowed my backups to show up in Home Assistant again.

Having this natively supported would be very helpful!

I’d certainly appreciate this as an HA container (docker) user.

+1 I prefer to use native stuff and use NFS mount as a backup folder. My nightly backup makes one local and one remote backup.

I can delete old backups easily enough locally with a shell_command but I cannot find the mount point ha uses for the NFS share so am a bit stuck doing that one programatically from ha - I have had to set something up on the nas (I use OpenMediaVault).