Problem/Justification
The new TrueCloud Backup tasks use restic under the hood. In the UI i can set the option to keep x (number of) snapshots.
Restic has the ability to define policies, on what snapshots to keep.
For example it is possible to define that restic should keep:
- The last 3 snapshosts AND
- The last 7 days AND
- The last 4 weeks AND
- The last 6 months
Which would result in this list of snapshots that will not be deleted (Assuming 31. of December):
- 2024-12-31 (last three snapshots)
- 2024-12-30 (last three snapshots)
- 2024-12-29 (last three snapshots, last 4 weeks)
- 2024-12-23 (last 4 weeks)
- 2024-12-16 (last 4 weeks)
- 2024-12-09 (last 4 weeks)
- 2024-12-01 (last 6 months)
- 2024-12-01 (last 6 months)
- 2024-11-01 (last 6 months)
- 2024-10-01 (last 6 months)
- 2024-09-01 (last 6 months)
- 2024-08-01 (last 6 months)
It would be great if we could allow the user configure a scheme like this in the UI.
Impact
Benefits for the users:
- Ability to restore files that were deleted a long time ago, without having to keep hundreds of snapshots (reduce backup size).
- More flexibility that is already available via CLI tools or in other backup solutions
User Story
- User creates a new cloud backup task
- User configures source and destination
- User is provided the field “keep last” where he can enter how many snapshots to keep
- Underneath the “keep last”-field there is a expand fieldset called “Advanced options”. User clicks it.
- The fieldset gets expanded and shows a headline “Additionally keep backups for the last…”
- Underneath the headline there are input fields for hours, days, weeks, months, years
- The fields have no label, but a suffix which is the time unit (f.e. “hours”)
- User enters 7 into the “days-field”
- User enters 6 into the “months-field”
- User clicks save and the backup task is created