danielwelch:
I can look into this. It seems like it should be possible but the addon will likely be required to use the hassio API. I’m imagining an option keep-last, which if set, will trigger calls to the hassio api to get date of all snapshots, and delete all but the last 5. I’d probably implement this in a separate python script. That’s run after an upload and only if keep-last is set.
Alternatively, this functionality could be exposed as a separate command, with its own option for keeping the last N snapshots.
I was experimenting with an addon that copies backups to a thumb drive and handles keeping the last x backups. It’s very simple bash code, but If it helps, check out what I did at Snapshot Service enhancement to USB-dongle - #3 by NotoriousBDG .
I prefer your Dropbox approach over what I was doing with thumb drive. Dropbox is much more flexible and it’s nice to know backups are stored in the cloud…
1 Like