-
Notifications
You must be signed in to change notification settings - Fork 215
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
Revise Auto- and Smart-Remove feature #1945
Comments
MockupThis is my current mockup about how the new auto-remove tab/dialog could look like. The wording is improved reflecting the slightly modified (and fixed) behavior. Suggestions, corrections, improvements are welcome.
Beside this GUI and its tooltip the user manual will be improved with this topic explaining more details and giving examples. EDIT: |
I think the sentences in the tooltips are a bit confusing, or at least not super easy to understand: Complete weeks are counted, starting with the previous week (date from-to).
Apologies if this is not the greatest feedback, I'm not a UI/UX expert by any stretch of the imagination, nor a native English speaker for that matter. Just trying to be helpful. |
"Preceding" is a bit unclear. Preceding to ... what? Now, probably, but it's not stated. Better be very explicit (KISS principle), use something like In the mockup, space and inodes need to go on top. They are technical limitations that set the constraints for everything else. You can omit the "older than NN years", because all snapshot ages are max'd by their respective number of periods (at least the longest -- years -- must have a default value). Also, make sure that always the highest allowed backup age is obeyed. Age precedence instead of rule application precedence removes the need for the user to think of the latter, except for space and inodes, and is easier to understand -- more KISS. (Dunno if that's not the case already.) If someone wants to keep 1000 weekly backups (I can't think of a reason why, but let's accept it for the sake of the argument), the first applied 15 years would delete the earliest 220 backups they wanted to keep. Let the user set the max. number of yearly backups, for consistency, and because the "older than NN years" is gone. Also, here a consistent wording would be better: not "per year" but "yearly" (all the other periods are "-ly"), so that no inconsistent wording might confuse the user to be wary of a different treatment of the number. Also, add an option that is time-independent. IIRC, grsync has something like "No matter what, keep the NN last backups". That has its use: Imagine that the user goes on holidays or sick leave for several weeks, then comes back and finds there was a big mistake made late on the last working day (they were already thinking of the holiday, say, or too ill to concentrate). After an absence of several weeks and the number of retained dailys set to too low, they have to go back up to a week for the status before the mistake and lose the good work until right before the mistake. If there were still the last, say, 20 hourly backups around, they'd lose 59 minutes maximum. In case users want it less fine grained, this could be done with absolute numbers for every period -- "Keep one x-ly backup for NN , but at least the last MM ." I hope that's not too confused... hard day. |
Thank you for your detailed answer. I appreciate that you took your time to dive into it.
But this rules are executed at last. That is what the GUI tries to reflect. Do I get you right, that the space/inode rules should get executed as first and before every other rule?
I do agree here. But that is also something I wouldn’t change at the moment but would save for a later version.
Yes, also a good point.
Agreed.
I like that.
Got it.
Thank you very much for your input. I will collect your ideas for "new" behavior in separate Issues and schedule them for later releases. And for the current issue I will also consider your input. |
Thank you for the kind words.
If they are applied last, this could cause removal of backup files (fresh or oldest doesn't matter here). First the backup would be written, then (if the total backups size were over the limits) the backups would be cut back to the allowed limits. Another wording point: "Applied in descending order" uses a word that in IT circles applies to values ("sort descending"). I would be more clear that their sequence is meant with "Back In Time goes through the rules below from top to bottom. Should rules conflict, the longer retention time will be applied" or so. |
I like the idea of handling the space and inode limits differently. As it is, it's unclear what gets deleted if you are out of space or inodes. I have always kept those unchecked, because in such a circumstance, I would prefer that it just fails, and then I will look at what's going on, maybe reducing the retention if appropriate. For example, I've had it happen that I added a mount to (huge) external storage without remembering to exclude it before the backup ran. If Back In Time were just deleting backups as needed to back that up, it could wipe out all of my backups just to create some monster backup that I don't want. |
U-oh... And that is reknowned, recommended, and widely deployed... And nobody noticed and acted!?! <shakes head sadly, then starts banging head against wall> You guys are doing a d*n needed job here! To find out what actuall happens:
=> Observe how BiT behaves when it reaches the limit. You might want to use a tool that logs and/or continuously monitors used inodes and total backups size. Logging would be great to see if things were written and later removed. [*]"visual grep", i.e. scan with your eyes through long lists. |
I am pretty sure, after checking the code, that the oldest backups are removed until enough free space/inodes are available again. And yes, this happens without respecting the other rules. Not cool, I know. But a rare case. I won't change it now, for the next release. But I definitely will change that behavior in the future. I like the idea to just remove those rules and transform into a clear warning/error message. Just give a message if the user defined threshold is reached. We have some other issues related to out-of-space situations. Beside using a user definied threshold BIT could also estimate the expected size (and maybe inodes) that might be used by a new backup. And it would warn before starting the backup that there might be not enough space/inodes anymore. But the estimate would be very blurry and might cause more confusing then benefit. |
For the current out-of-space removal, data loss may occur. If it's not there already (have not checked), add a line to warn users to the Readme, and to known issues, just to save the one or two rare cases from the looming doom and despair. :-) A small GUI label "This overrides all other settings here" would be a good precaution, too. Pre-backup guesstimates would be too inaccurate, IMO, even when derived from recent backups. E.g, someone switches from mail and text work to work with virtual machines (with their large disk files, esp. if these are not snapshotted themselves), or vice versa, and any estimate will be misleading at best. In BiT, you could implement an early warning, sort of "Your backups are approaching the [ maximal available space of the backup volume | [ space|inode ] limit you have set ]." Any default of sufficient size will be useful. (Just guessing for space: 10% or 50GB left; I have no idea for a good inodes value here.) This could also be customized by the user in an additional child setting below the limit setting lines: ".. and alert me when <space|inode warning setting> is reached." The warning could also be independent from limits acutally being set and positioned in the GUI on the same level: "Warn me when only XXX free space-units/inodes are left" (absolute or as percentage). The customizable in-app warnings are definitely a nice to have, to be postponed now, IMO (unless they are rather quick to implement; no idea if they really are). |
Deleting oldest backups first in that case is what I would have guessed. And those are not the ones I would consider most disposable if I were choosing manually. But someone with a very different retention strategy might find it useful. For example, someone who only keeps daily backups for the last N days might be happy with that N being reduced rather than missing a backup. Looking ahead to check for space or inode availability becomes a lot of work trying to predict something that can't really be made reliable anyway. And if you are out of space, failing before trying is only marginally better than failing after trying. |
Sorry to be late to this party! I like the redesign in the mockup, especially matching the order of actions in the GUI with execution order and separating the "Keep" rules. This makes it easier to understand how the options work together, ie. sequentially. IMO there is no reason to remove the first option (remove if older than N years) or the last (remove using free space or inodes criteria). Changing the order in the GUI has already made things clearer, and with suitable documentation these options can be useful. Users can choose to use them or not. I think the concerns about these options (eg. which backups get removed to free up space or inodes) mostly disappear if their operation is properly documented. The most obvious method is to remove the oldest and I think this is what most users would expect. Ultimately if users don't like how it works, then they just don't use it. They can remove backups manually. As "one snapshot per year for all years" is not an option I don't see why it needs to be here, esp. in the "Keep" box. Either move it to the bottom as a comment, or even remove it. This feature of BiT should be documented anyway. Need to define "week" - ie. Sunday to Saturday, or Monday to Sunday and not any 7 consecutive days. Also should state that "month" means a calendar month.
I'm not sure this is necessary - just don't use auto-remove. The remove/keep options are already complex without adding more. The documentation should include a few example configurations with clear explanations of how backups are retained and deleted as time progresses. I'm not sure that all the "hand-holding" that's been suggested is needed. Good documentation (I keep repeating!) solves most issues. As a native English speaker I will offer to help if wanted. IMO the most useful extra would be a trail run option (like the rsync -n option) - show what would happen without actually doing anything. |
Documentation of research about how the smart- and auto-remove of BIT is working. - A maintain-docu file is added. - Doc strings improved - Fix minor bug: `smartRemoveKeepAll()` now check dates and not snapshot IDs. That caused inconsistent behavior with keep-rule on day level. - Refactor: increment and decrement months - New unit tests. Related to #1945
Thank you for all your input.
|
Hello, again I am interested in your opinions about my approach about the auto-remove feature for the upcoming release. Regards, |
Summary
This is a meta issue covering a complex topic related to several issues that can't be solved isolated. The behavior of auto- and smart-remove feature is "unclear". It is not documented. Users have different expectations, based on incorrect wording in the GUI and several bugs. Code related to auto- and smart-remove is not covered enough by tests and not able to test because of its structure.
Beside the details my approach would be to create a mock-up but clear documentation and GUI the way how the auto-/smart-remove feature should work. That docu & GUI then might be a good base for further discussions not focused to much on code details.
What need to be done
Notes and ideas
Related issues
The text was updated successfully, but these errors were encountered: