bupstash icon indicating copy to clipboard operation
bupstash copied to clipboard

Configurable disk size limit of the repository?

Open dimitarvp opened this issue 4 years ago • 3 comments

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.

dimitarvp avatar Jan 17 '21 15:01 dimitarvp

Some sort of quota or automatic cycling does sound like it could be an interesting feature.

andrewchambers avatar Jan 17 '21 20:01 andrewchambers

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.

dimitarvp avatar Mar 18 '22 23:03 dimitarvp

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.

andrewchambers avatar Mar 19 '22 00:03 andrewchambers