Hello:
Perhaps I am being too rigid or have not completely understood the documentation. The file names in the --exclude or --files-from are described in the documentation as when they have special characters the “special characters must be escaped”. But is this actually true?
I am running restic 0.9.6 on an up to date Windows 10. I have been doing some minor testing and put the following in a excludes.txt:
K:\test\restic\file with $ in middle of name.txt
The $ was not escaped but the file was excluded from the backup. So I am asking if the $ needs to be escaped only when there is a matching environment variable name after the “$”?
Here is the corner case that I’m thinking about: The documentation says:
Blockquote
For example maybe you want to backup files which have a name that matches a certain pattern:
$ find /tmp/somefiles | grep ‘PATTERN’ > /tmp/files_to_backup
You can then use restic to backup the filtered files:
$ restic -r /srv/restic-repo backup --files-from /tmp/files_to_backup
Blockquote
But does that actually work if the user has any special characters in the names of the files? The files-from is a plain file list and any special characters are not escaped. If someone had a file with the “$USER” (that is the characters: dollarsign USER) as part of the name would it actually be backed up by the above documentation commands?
Also, is there documentation on what happens if a file or directory matches both the files-from and the excludes?
Sorry to be a bit of a pain in the rear end but I do like restic and was having problems excluding $RECYCLE.BIN and went off on a bit of a tangent.
Is there a way to donate money?