shd2h
March 2, 2025, 12:00pm
3
Hey, it seems like you might have hit this issue perhaps?
opened 02:06PM - 27 Feb 22 UTC
closed 07:20PM - 03 Jul 24 UTC
Output of `restic version`
--------------------------
restic 0.12.1 compiled w… ith go1.16.6 on windows/amd64
How did you run restic exactly?
-------------------------------
`restic restore -t C:\temp --include "/G/Restictest/Folder 2 [square brackets]"`
What backend/server/service did you use to store the repository?
----------------------------------------------------------------
local file system
Expected behavior
-----------------
restic restores the folder `Folder 2 [square brackets]`
Actual behavior
---------------
nothing is restored
Steps to reproduce the behavior
-------------------------------
Add the files of the attachment into a repo and try to restore with the steps above.
Do you have any idea what may have caused this?
-----------------------------------------------
No
Do you have an idea how to solve the issue?
-------------------------------------------
It works with `restic restore -t C:\temp --include "/G/Restictest/Folder 2 *" latest`
However it took me some minutes to figure it out that the problem is obviously caused by square brackets in file name.
Did restic help you today? Did it make you happy in any way?
------------------------------------------------------------
Restic makes me feel happy and save every day because for me it is the best backup program on the market right now. I trust my data is safely backuped with restic. It makes me happy to improve restic.
[Restictest.zip](https://github.com/restic/restic/files/8148761/Restictest.zip)
See also: Restic 0.16 windows - include does not work
If so, a suggested solution in that issue was to enclose the opening square bracket in another set of square brackets to escape it. I take that to mean something like this might work:
/f/UserData/Pictures/Set05/2018/2018-09-09 - Bernal/[[]Originals]/DSC01491.JPG
Unfortunately, I don’t currently have easy access to a windows machine to test the above. FWIW, some quick testing in Linux shows single-quoting your entire file path works, so it does indeed seem like this is a windows specific issue.
1 Like