bupstash
bupstash copied to clipboard
Configurable disk size limit of the repository?
It would be very cloud-storage-friendly if we were able to do something like bupstash limit --set 5GB and then, a la macOS's TimeMachine, bupstash put ... would remove the oldest snapshots until there's enough free space in the repo for the current snapshot.
Concurrently, a command like bupstash limit --unlimited (or --clear) should also exist, serving to remove the limit.
Clarification: my current use of bupstash is to backup to a local repo which then gets rclone-d to several cloud storage services.
Some sort of quota or automatic cycling does sound like it could be an interesting feature.
Sorry to pester -- have you considered implementing this at one point?
It's not a deal-breaker. But it did occur to me that I can script this myself by listing snapshots, ordering them by date -- sorting by unix_timestamp_millis -- and deleting the oldest snapshot(s) until the repo's size is below the quota -- but I admit I haven't tried that yet.
It's perhaps not so simple because there is no efficient way to tell how much data you are going to free each time you delete a snapshot (they share data with eachother) - it needs more thought but isn't super high priority atm.