Automation to delete old snapshots?

Would appreciate any help in creating an automation to delete old snapshots. I found the automation for creating and have set it up to auto snapshot every 2 days. I use Carbon Copy Cloner on my Mac to copy the snapshots automatically (via Samba Share) to my NAS. Now what I need is a way to only keep the last 5 backups.

I realize there are add ons that will do this but I don’t want to backup to Google and, given the recent concerns with add-ons, I would prefer to use an automation if possible.

Thanks!

there is a really good addon out for this: Samba Backup

it handles everything. copy to a share. delete old entires

2 Likes

Thank you. I would prefer to do this with an automation rather than an add-on if possible.

not sure if this is possible out of the box
this hacs integration: https://github.com/jcwillox/hass-auto-backup
brings a new service to purge snapshots

1 Like

Ended up installing that add on which is perfect