[ExclusionException] not working

Comments, questions, bug reports, etc.
bliblubli
Posts: 88
Joined: Thu Dec 31, 2015 10:45 am

[ExclusionException] not working

Post by bliblubli »

With this config file:

Code: Select all

[ExclusionList]
\
[ExclusionException]
\Users\test\AppData\Local\test
and following command: wim capture c:\ d:\appdata.wim "20160526" --config="configwim.txt"

I get 0 files, although the test directory have a lot of them. What am I doing wrong?

Code: Select all

Scanning "c:\"

Excluding "\\?\c:\" from capture
0 bytes scanned (0 files, 0 directories)
synchronicity
Site Admin
Posts: 474
Joined: Sun Aug 02, 2015 10:31 pm

Re: [ExclusionException] not working

Post by synchronicity »

Files underneath an excluded directory are not scanned. Therefore, in your example, the path \Users\test\AppData\Local\test is never seen by wimlib at all. Currently, the use case for [ExclusionException] is to name specific file(s) which should be included despite matching a wildcard pattern. This is different from what you're trying to do, which is specifying an included file underneath an excluded directory.

Making your use case work is something to think about, but it seems difficult. Either wimlib would need to scan everything regardless of [ExclusionList], or it would need to scan from the root plus all the files named in [ExclusionException], of which there may be many.

For what it's worth, Microsoft's WIMGAPI has the same behavior as wimlib regarding this matter.
bliblubli
Posts: 88
Joined: Thu Dec 31, 2015 10:45 am

Re: [ExclusionException] not working

Post by bliblubli »

Is there a best way to save different directories with one command? Point would be to have a list of directories to regularly backup.
synchronicity
Site Admin
Posts: 474
Joined: Sun Aug 02, 2015 10:31 pm

Re: [ExclusionException] not working

Post by synchronicity »

Yes, just use "source list" mode. For the example you gave, create sources.txt containing:

Code: Select all

c:\Users\test\AppData\Local\test \Users\test\AppData\Local\test
Then do:

Code: Select all

wimcapture sources.txt out.wim --source-list
See the documentation for details.
bliblubli
Posts: 88
Joined: Thu Dec 31, 2015 10:45 am

Re: [ExclusionException] not working

Post by bliblubli »

:oops: I don't know how I could miss that one. Thank you.
bliblubli
Posts: 88
Joined: Thu Dec 31, 2015 10:45 am

Re: [ExclusionException] not working

Post by bliblubli »

After making a custom config file, I have 2 questions:
- how do you add your list to the default one? I made a backup of the windows partition, but the files and folders that where ignored by default (recycler etc.) where included, it seems because I specified a config file.
- When you apply a wim made with a source list, how do you prevent overwriting existing files, and better, how would you get the equivalent of "only overwrite if more recent"?
synchronicity
Site Admin
Posts: 474
Joined: Sun Aug 02, 2015 10:31 pm

Re: [ExclusionException] not working

Post by synchronicity »

Neither of those features is currently implemented.
synchronicity
Site Admin
Posts: 474
Joined: Sun Aug 02, 2015 10:31 pm

Re: [ExclusionException] not working

Post by synchronicity »

I should add, however, that the default capture configuration file is documented [1], so you could manually create a new configuration file based on that file.

[1] https://wimlib.net/man1/wimlib-imagex-capture.html
bliblubli
Posts: 88
Joined: Thu Dec 31, 2015 10:45 am

Re: [ExclusionException] not working

Post by bliblubli »

Yes, it works, thank you :) An option for what to do in conflict cases would be really great (replace, replace only if newer, keep both copies, skip)
DirkM
Posts: 1
Joined: Mon Sep 04, 2017 4:34 pm

Re: [ExclusionException] not working

Post by DirkM »

My apologies for continuing this old topic but I'm currently trying to figure out why my capture is not picking up certain files.

I'm using the following config file:
[ExclusionList]
\$ntfs.log
\hiberfil.sys
\pagefile.sys
\swapfile.sys
\System Volume Information
\RECYCLER
\$RECYCLE.BIN
\$Recycle.Bin
\Windows\CSC
\Users\test\AppData
[ExclusionException]
\Users\test\AppData\Local\Microsoft\Outlook\some.pst
\Users\test\Documents\Outlook Files\someother.pst

My resulting WIM is including the someother.pst (expected because it wasn't excluded) but it does not include \Users\test\AppData\Local\Microsoft\Outlook\some.pst because the parent directory \users\test\AppData is excluded. \Users\test\AppData\Local\Microsoft\Outlook\some.pst exists and is confirmed present when I capture the wim.

Any hint on what I'm doing wrong would be appreciated.

Thanks,
Dirk
Post Reply