Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decay-scale minimum value is awkwardly high #87

Closed
pm215 opened this issue Nov 15, 2020 · 5 comments
Closed

decay-scale minimum value is awkwardly high #87

pm215 opened this issue Nov 15, 2020 · 5 comments
Assignees
Labels
Milestone

Comments

@pm215
Copy link

@pm215 pm215 commented Nov 15, 2020

The decay-scale prune parameter minimum value is 2. This is a bit awkwardly high, I think. If I understand the pruning policy correctly, this means that there will be buckets of size 1, 2, 4, 8, 16, 32, 64, 128, 256 (at which point we hit the decay-limit 366 day cutoff), so there will be a few very recent backups of age < decay-start and then at most 9 covering the rest of the year. To have more backups retained than that, I think you would need to have a lower decay-scale. For instance with decay-scale = 1.5 I think you get 13 buckets in a year. (Conversely, values higher than 2 seem to me like they would be pretty useless because of how quickly the bucket size would grow, but presumably somebody has a use for them.)

Could the parameter be made to accept floating point values? Looking at the code the prune_decay_bucket() function that calculates which bucket a backup is in already takes 'double' parameters for the window and scale arguments, so it might only be the parameter-parsing code that is enforcing integer values here.

@ewxrjk ewxrjk added this to the 8.0 milestone Nov 16, 2020
@ewxrjk
Copy link
Owner

@ewxrjk ewxrjk commented Nov 16, 2020

Yes, I think that would be possible.

@ewxrjk ewxrjk added the feature label Nov 16, 2020
@ewxrjk
Copy link
Owner

@ewxrjk ewxrjk commented Nov 29, 2020

If possible please try this branch: https://github.com/ewxrjk/rsbackup/tree/issue87

@pm215
Copy link
Author

@pm215 pm215 commented Nov 29, 2020

Without a mechanism for "tell me what the set of retained backups would be with these new settings" it's not very easy to test...

@ewxrjk
Copy link
Owner

@ewxrjk ewxrjk commented Nov 29, 2020

Fair point. --prune -n should tell you what would be removed but you'd have to invert it yourself. So there's a feature gap here

@pm215
Copy link
Author

@pm215 pm215 commented Nov 29, 2020

I tried a test with "--prune -n" and that branch's rsbackup. It accepts a "decay-scale 1.5" but the output of --prune -n is identical to the output if it is set to 2 (with this random in-production backup disk that happens to want a lot of pruning because it's just been swapped in today.)

@ewxrjk ewxrjk closed this in 796af97 Dec 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants