npbackup icon indicating copy to clipboard operation
npbackup copied to clipboard

[BUG] Cannot restore specific files due to file name

Open kitsumed opened this issue 2 months ago • 3 comments

Hi, I was recently trying out your GUI on Windows 11 and noticed a odd behavior on version 3.03 (2025070501).

Context: I made a backup of some test samples mp3 files under a tree that look like this E:\Z\audio-test-samples\

Inside that directory are the following files :

  • 1_Text Test Format (Cover) [vocals]_(No Reverb).mp3
  • ogg.ogg
  • voice-sample.mp3

If I go into your GUI and select the latest snapshot/backup and press See content > Select 1_Text Test Format (Cover) [vocals]_(No Reverb).mp3 > Restore > Set a output directory > Ok.

The select file does not get restored. However, if I select any of the others files, they do get restored. If I select the parent folder, all files, including 1_Text Test Format (Cover) [vocals]_(No Reverb).mp3, get restored.

My guess is that there is some error in the command send to restic due to the filename of the file 1_Text Test Format (Cover) [vocals]_(No Reverb).mp3.

kitsumed avatar Oct 17 '25 23:10 kitsumed

This is actually a restic problem, I've opened a ticket here

deajan avatar Oct 21 '25 08:10 deajan

@deajan according https://forum.restic.net/t/windows-restore-include-file-and-escaped-characters/9439 this can be related to or duplicate of https://github.com/restic/restic/issues/3658 which links to https://github.com/restic/restic/issues/4867 ...assuming square brackets are the culprit.

another potential related restic discusstion: https://forum.restic.net/t/restore-specific-folder-with-spaces-in-the-path/7262

GuitarBilly avatar Oct 23 '25 11:10 GuitarBilly

@GuitarBilly Thanks for your feedback. Indeed, on windows, restic complains when I try to escape the square brackets only, but not the parenthesis. It looks like this has been an issue for quite a while now. Replacing square brackets by ? works for restoration, but that's not a good idea. Someone suggested in #4867 to have a parameter for verbatim includes, but it has been some time.

deajan avatar Oct 23 '25 11:10 deajan