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 default backup filter UI #3030
Comments
I completely agree that we should explain more what the filters actually do. Do you think a short description is sufficient like "These filters exclude system files from your backup. Please check the content of your backup when one of the filters is activated." |
I'm not sure. It seems to be a little more complicated than just being system files https://forum.duplicati.com/t/release-2-0-2-19-canary-2018-02-12/2455/14 There are multiple rules that I think are questionable in this list and even after fixing those it may still be an issue about what people think of each rule. The UI doesn't have to display them in-line, but I think it's unfair to require a user to make a full backup and check the contents of all folders before they can "know" what the filter does. |
I cannot remember when we introduced this and what the use case behind those OS-specific filters was. Were they introduced so that a simple backup of / or C:\ would turn into a backup that only contained user data? Or is their purpose to remove sneaky files from the backup like the famous 'desktop.ini' on Windows? Before we revise the filters, we have to define what the exact use case is. If we have that definition already, please tell me :-) |
I was the one to initially add it, and my initial goal was mostly to remove things that aren't really important to be backed up (caches, temporary files, etc.), and to prevent errors attempting to back up system files that don't need to be backed up which might not be normally accessible (e.g., System Volume Information, $RECYCLE.BIN). One specific example is things like the Google Chrome cache in the AppData folder - I want to backup my entire user folder, but don't need to keep a running update of what happened to be in my Internet cache that day. Originally, I was also thinking that system files (OS, program files, etc.) should be skipped, but especially after the recent discussions I'm much more inclined towards not filtering those (and letting the user choose to back them up by selecting those folders as sources instead). I just pushed a commit to my branch that removes a number of the default filters for folders that might have things that should be backed up. @Pectojin - Does it remove most of the rules that you think are still questionable? (It's more closely related to what Crashplan does, as most of the filters are now the 'Admin filters' from here, while most of the things that Crashplan just hides by default are no longer filtered.) |
Heh, @tygill beat me to commenting by like 40 seconds and made my comment irrelevant :) The new commit is looking good. It addresses all my original concerns for my own backup. You removed some filters that I might not have removed - I'd never back up Overall I'd say this would bring this issue close to resolved for my own purposes, but I don't know if anyone else has thoughts on Windows/Mac filters, as I didn't use those. I'd still like the option for the user to view a list of filters applied by the defaults, though. But maybe it's less important if no one is affected negatively by the new filter |
Even if the rules fix your issues/concerns, users will not understand what they will get when they select one of these options. And from checking the rules, I have no clue how to explain in simple words what is going to happen. I also get the impression, that none of the OS-specific filters will ever be perfect for all users. Why not use the filter rules as suggestions that the users can pick from? That way we can offer rules for specific purposes. The UI could then look like this: As a nice side effect: We give users examples how filters are defined. |
Ah, that might be a good way to show it. Actual tangible results that can be inspected and tweaked. It shouldn't be terribly difficult to implement but I'm thinking there might be some issues defining when the box is "checked". If I check it and remove 9 out of 10 rules, is it still "checked"? And do we remove the rules when unchecking? As long as they haven't been changed? |
Maybe we should make a new issue for this frontend and ship it in next canary/experimental? It won't affect users who already set up their backup since they won't look at it, and it wasn't displayed before so nobody is "losing" functionality. |
@Pectojin - I see /lib and /bin as very similar to Program Files on Windows - while it's likely that most programs can probably be reinstalled fairly easily, it's possible some users might have things installed there by hand or in a way that they want to back them up. @renestach - One difference with doing it that way (offering suggestions that the user opts-in to) is that if the filters change in the future (either to add or remove or clarify a rule), the user wouldn't get that change without editing the backup and looking at the new suggestions. I can see how that could be considered both a good and a bad thing, but it is a difference. I would also want to make sure that default filters are relatively straightforward to use from the commandline. |
I am not sure if you got my idea. There are no check boxes anymore. Actually we define a list with sections (Windows, Linux, Mac). Within those sections we have specific filter rules. The users can use the dropdown boxes to first pick a section and second one of the rules within this section. The (+) button will then add the selected rule to the list of filters at the top. This filter can be modified or deleted then. Actually, it is just a list of examples and recommendations to choose and learn from. |
@tygill I don't think we should change rulesets for existing updates at any time unless we have a very, very precise definition of what the ruleset exactly does (we do not have this - the list looks quity arbitrary). We are discussing this feature now because someone complained that the behaviour has changed when the feature was fixed. For our personal peace of mind I recommend to change the feature in a way that we suggest filters that make sense and users have to pick them manually. No update will change any backup. Users get exactly what they think they need. And they learn how filters work. Last but not least: It would deactivate all the filters again, so that we do not have to be careful about the next update. |
@renestach your suggestions could work, but have some backdraws.
I like the checkbox approach more. Choose an OS and open the pull-down menu, just like your first suggestion. However, the pull-down menu doesn't list the expressions itself, but human-readable descriptions (System Volume Information, Windows Registry, Cache files, Recycle bin, etc). Generally, I agree being reserved with OS specific exclusions. They should be limited to
Other files like application settings shouldn't be excluded by default, they do not harm and the user can exclude them himself. Maybe they can be listed in the pull-down menu, but disabled by default. There's one problem with the "checkbox approach": how to parse this from the GUI to the command line, I'm not sure how to deal with that. |
@kees-z just beat me to expressing some of the same points I was thinking. @renestach - Essentially it sounds like you're advocating moving filters out of the internal code completely, and turning them into a UI feature, correct? This would make using default filters from the command line more difficult (though I suppose we could still keep the existing flag and behavior, but change the UI to not use it directly). Continuing on kees-z's points, one thought is that we could break the filters down into more granular groups than just 'Windows', 'Mac', 'Linux', and each of these groups could have it's own checkbox (and possible a
... Assigning each filter to a group may not be terribly straightforward, but it would probably be a good exercise in making sure the filters are indeed useful. It would also make sure it is clear to the user what each is excluding. Ideally they wouldn't change in the future, but this way we would open up the possibility of adding new groups. This could also be done using the existing design and infrastructure, which would make the filter groups still easily used on the command line. On a related note, I also remembered that @kenkendk added support (on Windows) to add custom default filters via the registry (based on this thread, it looks like there's a standard registry key for indicating files that shouldn't be backed up which it uses). If we go the route of making this a UI thing, then that feature would be disabled as well. |
I see two different users: pro users that really do not like us changing the backup settings after they have verified that it works as they want. The other is the "casual" user, who is likely to just add "C:" without excluding anything "just in case". Traditionally, we have tried to cater to both by adding commandline options, where the default is what we expect casual users to want, and I think we can do the same here. I do not see any case where one would want to apply options for another OS. It makes no sense to exclude Windows paths on MacOS for instance. I think this feature works better if we divide the filters into "groups", such as: log files, temporary files, system files, program files, etc. The exact filter rules needs to be documented somewhere, but they are different between OS'es and can change with each release. We can allow a group as a normal filter, like:
This would allow interleaving the groups with normal filters and thus override rules, and is also easy to merge into the UI. Would this resolve the concerns? |
I suppose any exclusion is disabled by default and a common set of files/folders is excluded after checking an exclusion group. Just like it is now with System, files, Temporary files and Hidden files.
Agreed. It also makes it a bit easier to present it in the GUI.
I guess that would work pretty well and gives more freedom to the user what to in/exclude without specifying tons of exclusions.
I think they should be available from within the GUI, by hovering over the group name or clicking a small info-symbol. In the current version, when I check "apply default filters for Windows", I have no idea what's actually excluded. I would have to Google that, but if filter sets could change, I still wouldn't know what's excluded. This lack of information was the main reason for the OP's problems.
Suppose there is an exclusion group "TempFiles" that applies the filters
|
Yes, preferably from the commandline as well.
That is why I want to move away from the
We can allow the current options, but mark them deprecated. I think that is fine as the feature never went into an experimental release. If we want to support something with more ease of use, we could add the groups to the list and only deprecated the OS names. |
I think my original request has been fulfilled, but then we got caught up in discussing UI changes. I don't think those UI changes are necessary for an experimental release, but we've got a lot of good discussion here. I'll take the milestone tag off and update the title to be more UI-centric :) |
Sounds good. In the meantime, I just opened a pull request for the change I mentioned above to remove some of the more problematic filters for now. |
After discussing this feature, I think we should redesign how it works. Other than what I suggested previously, we might introduce specific filters (that contain a defined set of filter rules) in the dropdown. Here, we can also explain what the filters do. See my mockup to understand what I mean. We still have to define what the filters are doing though. Caches are obvious. We could also exclude system-clutter on network drives and others. |
I like that idea. Gives more control and more transparency but at no cost to ease of use. |
I have now implemented the code for this feature in a branch: The major changes are in: For now I have removed the Windows/OSX/Linux options, but we can consider re-adding them in the parsing code, such that they are individually equivalent to "Default":
The output on MacOS with
And the short version (shown under Advanced options in the UI):
Lots of details to consider, but for now I have made It should be easy to add a dropdown of the kind that @renestach proposes. |
I just took a look at this change, and it seems like a pretty good start to me so far, (though having someone else review to make sure the paths seem to fit the groups they've been assigned to would be good). I left a few comments inline in the diff, mostly with a few questions about whether certain paths should be included / are in the right group. |
I am sure we can discuss what goes where for a long time, and that is fine. I have updated the branch with @tygill 's suggestions. One thing I am not entirely sure of yet, is the log files. A common user would not want these files backed up, they would want "documents and settings" only, but a sysadmin would certainly want these included. Does it make sense to have a "log files" group as well? |
I just took @kenkendk 's filter_group branch and did some more work with it: The main thing is that I've implemented the earlier suggestion to use filters via the One larger impacting change I've made is removing the The main thing that I know is still missing is the UI. I haven't yet removed the original default filters UI, or replaced it with support for filter groups using the new syntax. I'm also not sure if there are parts of Duplicati that will have problems with filters that look like But hopefully this gets this a bit closer to being officially revived :) |
I just removed the default filters UI on my branch, and added an option for excluding filter groups to the regular filter drop down (though it doesn't prompt you with any list of available groups or anything - I tried to look at hiding the text entry when the feature group option was selected, but I don't know enough about Angular to figure out how to hook that up.) |
I like the inline dropdown as it makes it fairly easy to see what options there are and it fits with the existing UI. Would it make sense to add the description text once you select an item in the dropdown? Sort of in the same way that advanced options provide descriptions after the option was selected? |
I think that would make sense, and hard coding the description text should be pretty straight forward (though there some things with how the filter strings are bound to the model and parsed back out that I wasn't able to understand, so I'm not sure I know how to add a new field in easily). The part I'm really not sure how to do would be adding the full list of filter rules, since that would like require adding a new web endpoint to request the list of rules for a given group. |
Right now it seems that inlining the hints is the standard. /Duplicati/Server/webroot/ngax/templates/addoredit.html#L331 At least that's what was done for the I know that the advanced options are entirely dynamically loaded from the backend, but they're arguably much more dynamic and changes more often than these options would. Edit: I think I didn't read your reply to the end and ended up not answering your question... That would be a good argument for having an API endpoint to pull the paths from. |
Yeah, the list of filter paths has enough dynamically generated stuff in it (pulling environment variables, operating system specifics, and system registry settings) that I don't think a static list would be very useful. That said, I'm curious whether people feel like that's a required feature before adding these back in. The previous discussion made it sound like that was what people were thinking, but with the subdivided groups I'm not so sure myself |
I'm marking this issue as resolved, since the initial change has now been merged. I've opened #3180 as a followup for exposing more details about the contents of the filter groups in the UI. |
Sounds good. Thanks for your efforts on this @tygill 👍 |
This issue has been mentioned on Duplicati. There might be relevant details there: https://forum.duplicati.com/t/only-exclude-file-filter-works/9807/7 |
Now that backup filters actually work when defined in the Web GUI we should revise the default filters to make sure other users aren't hit by similar filter issues as I was:
https://forum.duplicati.com/t/release-2-0-2-19-canary-2018-02-12/2455/6
Additionally I think we should improve the UI to display more information on what the default filters actually do.
I think it's a show stopper for an experimental release to risk many people upgrading and not discovering that parts of their backups are now filtered aggressively.
The text was updated successfully, but these errors were encountered: