I’m playing around with configurations, and I’m generally selecting everything in the user profile, but excluding %APPDATA% (in the GUI I have hidden files/folders visible to ensure this is deselected).
So far, so good.
But what it I want to include one or more specific subfolders in %APPDATA%, even though %APPDATA% itself is excluded? I have found no way in the GUI to do this (once the root node of a tree is deselected, you can’t check any of the child nodes), or using the command-line… I thought of just adding something like
Note that I don’t want anything from AppData except certain files or subfolders. However I do want everything from the main profile folder (which is the parent of AppData, now deselected), including any subfolders/files that exist now and any that may be created in the future.
In CP, you select a folder (C:\Users\jt), then can deselect a child folder (C:\Users\jt\AppData), but then (most importantly) you can re-select a child of a child (C:\Users\jt\AppData\Local\Electrum\wallets).
In Duplicati, at least in the GUI, once a folder is deselected from the tree (marked with a red cross), you can’t select any of the child nodes, overriding the choice on the parent node. I’m not sure if this is a bug or a feature
I’ve been unable to figure out the best way to do this, and have tried all combinations suggested here and then some (and I have now discovered the “test-filters” command-line function!). I know the “easiest” way to do this is just select all the folders I’m interested in directly from the tree, without selecting the main user profile folder (C:\Users\jt). But the downside to this approach is if any new files/folders appear directly under the main folder (e.g. C:\Users\jt\NewFolder), it will not be included in the backup set unless it is explicitly selected…
I should note that if my problem were limited to the user profile folder, it would be a non-issue. It’s unlikely any applications will ever create folders outside the “normal” places. I have a similar selection issue in other general data folders, but decided to use the above as an example of this use-case since everyone (on Windows, at least) is familiar with the above folder structure.
Unfortunately, that doesn’t work, it was the first one I tried yesterday. I’ve created a dummy folder structure to test things out and find the best/easiest solution to this (assume there are files in each of these folders):
(I’ve excluded non-relevant parameters like database path, encryption, etc)
Tried --include and --exclude as both regular expressions (using “[…]”) and standard text filters. I’m using the above command with “test-filters” to see what is being selected, and in all cases I tried, you can’t include a file/folder which is a child of an excluded one.
I’m now trying to flip everything upside-down, and only use an “exclude” filter, where it excludes everything except the folders I want to keep (this is work in progress, doesn’t work yet):
Guys, really need your help!
try to figure out for several days, how to make it work.
i want to include one file using the filter settings
but exclude using the filter settings
It will be great, if someone could give an example
According to the discussion above what you’re trying won’t work in the way that you’re trying it.
However, if you invert what you’re doing you might get close to what you want. For example, if you say “exclude everything in the \AppData\Local\ folder that does NOT end with Bookmarks” you should get \AppData\Local\Google\Chrome\User Data\Default\Bookmarks. But you could also get \AppData\Local\Mozilla\Firefox\something\something\darkside\not-really-Bookmarks.
If you want to test it it, I suspect the exclude regular expression field value would look something like: .:\\Users\\[^\\]*\\AppData\\Local\\.*[^\\Bookmarks]]
Note that I have not tested the above, so if you try it (or similar) out and it works please let us know.
In addition to @JonMikelV 's solution, you can also add the Bookmarks folder as a source folder.
As it would not make sense to include a source folder and then add a filter to remove it, source folders are exempt from the filter rules.
adding as source folder wont work in multi user evironment, when you have several servers and there 10 user, each of them with there own home directory.
The idea was to backup only some files, that are vital for google chrome recovery and exclude everything else.
Thanx for the idea, can you paste it in plain text format, if possible.
do i need to add any regular expression or filter settings in the filter section in addition to NOT INCLUDE bookmarks settings?
I will report about the result
tryed different combinations… this is not the solution
will try a bit later in the freshly installed testing enviroment…
is there any document or manual, discribing the regular expression syntaxis (possibly with some examples) that can be used with duplicati?