Gui restore works, commandline doesn't

Some of this looks like bugs. Cross-OS (backup on Windows, restore on Linux) might not be done much.
I’ve led people through the GUI. Trick is to use Pick location, because Original location doesn’t fit.
Your restore-path seems the CLI equivalent. Restoring a DB to backup folder is unusual but might be OK.

Got a link? This surprised me, but seems to sort of work. It might be recreating a local database for you in

sort of like the GUI Direct restore from backup files, so that might either get work each time, or a stale DB.

My usual advice for trying to match a GUI job in true CLI is to edit from an Export As Command-line which will use the same DB and options (and help to avoid some quoting problems, or omitted relevant options).

This gets deeper than I can go. I don’t know if any current developers know the area well, but you can try.
How about filing an issue with full steps? This one seems easy compared to the Nextcloud strangeness.

My guess at giant “HUH”? is below. I guess adding ‘*’ anywhere (even end works) switches to Wildcard.

which then switches code below

where a profiling log in the wildcard case does the expected replacement of my what’s-the-point * to %.

2021-02-08 21:07:16 -05 - [Profiling-Timer.Begin-Duplicati.Library.Main.Database.ExtensionMethods-ExecuteNonQuery]: Starting - ExecuteNonQuery: INSERT INTO “Filenames-8CEC364060063A4B87C668B2A9BA88FE” SELECT DISTINCT “Path” FROM “File” WHERE “Path” LIKE “C:\Program Files\AESCrypt\aescrypt.exe%”

Without the *, I get a substitution that I can’t track down, but weirdness at start may explain the non-find.

2021-02-08 21:04:15 -05 - [Profiling-Timer.Begin-Duplicati.Library.Main.Database.ExtensionMethods-ExecuteNonQuery]: Starting - ExecuteNonQuery: INSERT INTO “Filenames-2CC2F50D7E4D654AAFDE2B387080CD44” SELECT DISTINCT “Path” FROM “File” WHERE “Path” LIKE “%/C:\Program Files\AESCrypt\aescrypt.exe”

5. The LIKE, GLOB, REGEXP, and MATCH operators

A percent symbol (“%”) in the LIKE pattern matches any sequence of zero or more characters in the string.

which is what a ‘*’ often means (thus the replacement with ‘%’), but why is it added, and what’s with ‘/’?

Windows running a find without the cross-platform complication didn’t even pattern-match. I think it did

2021-02-08 22:11:06 -05 - [Profiling-Timer.Begin-Duplicati.Library.Main.Database.ExtensionMethods-ExecuteNonQuery]: Starting - ExecuteNonQuery: INSERT INTO “Filenames-8C5EFEF21748C747A1F886925DB155E8” SELECT DISTINCT “Path” FROM “File” WHERE “Path” = "C:\Program Files\AESCrypt"

but I think a developer on Linux with at least the right tools and ideally right knowledge should investigate.
Can you write a good step-by-step that such a developer can do, and get it in the line as a GitHub issue?