"Cherry-picking" include filters

Hi guys,

I’ve been selecting only specific files in few of my backups which are supposed to be cold storage backups. It’s quiet a reverse approach to excluding filters as described in most of faq and how-to’s. My filter looked like:


I tried so hard to simplify this syntax to regex one:


It seems that this filter works with one of my storages. Something weird happens when I use lightly modified filter on the another storage:


Log is full of the records:

2023-03-14 10:36:58.351 WARN OPEN_FAILURE Failed to open file for reading: open \?F:\ServerFolders\ … _1_202106.xls: Access Denied.

I don’t want to read / backup any file except the .arj, .zip and .7z! Fortunately I run this task with -dry-run parameters so my cold storage plan did not exhausted my wallet with thousands of unnecessary chunk uploads. What I’m missing?

So why are you going regex route? What is the problem that your first wildcard setup is not solving?

If you don’t have to use RE - don’t, they are hard to read and modify properly. For instance, there are several errors in your definitions. /* is either malformed (because / usually needs to be escaped), or in this case most likely matching all strings with 0 or more / in them, which is literally any string out there, so that’s why all your files are matching.

(?i).(arj|zip|7z)$ is also not quite right, as dot here will match not just dot as you probably wanted, but any character.