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.
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.
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.
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!
+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).
Google drive backup and Samba Backup are great addons. I also used the Samba backup for a long time.
With the new network storage options in HA, this feature makes more sense than before. At the very least, it would make the SMB backup addon obsolete and transition into native HA functionality with a blueprint or two for automations.
And I would definitely prefer on-board tools to additional add-ons
This is how I accomplish this functionality on a NAS share without addons
Attach a folder to the same folder as where your backups are going but call it something different, i.e. Backups is what HA attaches as a backup type network storage and the same share on the NAS is also attached as a share type called Backups_Share
add this to config.yaml
command_line:
- switch:
name: Backups Cleanup
# go to backup directory, list files by date, filter result list to hide the first X # of results and remove remaining
command_on: 'cd /share/Backups_Share/ && ls -A1t | tail -n +30 | xargs rm -v'