Including/excluding files and folders

Every backup run consists of 3 main phases - scanning, planning and execution.

In the scanning phase the program looks at the source and backup locations and builds two lists of files and folders. These are referred to as source and backup "file trees".

In the planning phase the program compares these two trees and compiles a list of simple steps that, when executed in sequence, bring backup location in sync with the source. The steps include basic file system operations like "create directory", "copy file", "move file", etc. The resulting list is referred to as a "backup plan".

Finally, in the execution phase Bvckup 2 merely goes through the backup plan and carries out operations as prescribed by each step.

Exclusion/inclusion filters

Exclusion/inclusion filters (or "rules") are configured in the "Backup What" section of the backup settings and they are used to decide which files or folders should be included in the file tree.

For each item (file or folder) the program first checks if it is explicitly included or excluded in the middle pane. If there's no match, then it goes through the rules from the bottom pane and checks them as well.

If there is NO match, then the item is treated the same way as its parent folder - if the folder is included, the item is in; if the folder is excluded, the item is out.

If there is a match, then the item is included/excluded as prescribed by the rule.

-- And that's it --

The option at the very top of the window merely controls the action assigned to the top location. With "Include everything" it's "include", with "start with an empty list" it's "exclude".

There are cases when we exclude/include a folder and we want it to be in/out with all its files and subfolders, all the way down and with no exceptions.

That is, we don't want another rule to override our exclusion, because it just happens to match some file in this folder. For example, we exclude /foo/bar/, but also have an "Include *.jpg" rule that will cause any jpegs in /foo/bar/ to be included.

Enter the "final" rule attribute.

When set to Yes, it suppresses all further filtering of folder contents and causes the folder to be included or excluded in full.

A rule may have this attribute set Yes or No, or not have it set at all. In the latter case, the filtering module uses one of 4 presets, based on what type of rule it is.

Rules from the middle pane are referred to as "verbose" rules.
Rules from the bottom pane are referred to as "generic" rules.

The 4 "final" presets are (verbose include), (verbose exclude), (generic include) and (generic exclude) rule types. All of these default to No.

However, when viewing a selection in "What to Backup", the small tick used on a selected-subfolder (when the parent folder is not selected) is quite hard to see. I'm not sure what to suggest .... maybe a grey, big tick against the parent folder? Or make that small tick red, or blue ...?

It's a secondary piece of information, so it doesn't really need to be highly visible. If someone's looking for this information (as in "I wonder if I have any folders excluded below the surface level"), they should be able to find it.

I had another option for this (the one on the right), but I think it takes an effort to notice it and to understand how it works. Though once you know that, it's pretty obvious - https://bvckup2.com/wip/r78-filter-icons.png

With the latest version, I'm in better control. I exclude the top-level and only include the sub-folders I want.

Yep. The new filtering framework is more flexible *and* more uniform at the same time. My main concern with it is that in some cases people might want to exclude a folder, period, and in other cases they may want to exclude everything in a folder by default and then reverse this with wildcard "include" rules. The default is the latter, but we'll have to wait and see if it's a good default or not.