You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a daily "-x / /boot" backup from my rp3, it contains (among other files) /bin/uncompress and /bin/gunzip which are hardlinked to eachother. To test if this works I wanted to restore them, so I ran:
$ mkdir z
$ restic -r ... restore --include bin/uncompress --include bin/gunzip -t z
And to my surprise I ended up with
z/bin/gunzip
z/bin/uncompress
z/usr/lib/klibc/bin/gunzip
Prefixing the include with a / wont work as the repo does not seem to contain the root prefix when calling the selectFilter(), so it won't match anything. filter.List also does not seem to have any anchoring characters. Seeing it defines ** to match multiple directories, I would guess the intent was to have Match anchor the pattern at the beginning of the string. E.g. it showing behavior of me having typed --include **/bin/gunzip
Output of restic version
restic 0.4.0 (v0.4.0-76-g4f5e9e9-dirty)
compiled with go1.8 on linux/amd64
Expected behavior
Two files:
z/bin/gunzip
z/bin/uncompress
Actual behavior
Three files appear:
z/bin/gunzip
z/bin/uncompress
z/usr/lib/klibc/bin/gunzip
Steps to reproduce the behavior
have a repository, backed up from / with both say
/bin/fileA
/usr/bin/fileA
$ restic -r ... restore --include bin/fileA -t z
you end up with both files under z/
The text was updated successfully, but these errors were encountered:
Before, the restorer called the filter function with a relative path,
this prevented anchoring absolute patterns (which just never matched).
Now call the restore function with an absolute virtual path, starting at
the filepath separator.
Closes#834
I have a daily "-x / /boot" backup from my rp3, it contains (among other files) /bin/uncompress and /bin/gunzip which are hardlinked to eachother. To test if this works I wanted to restore them, so I ran:
$ mkdir z
$ restic -r ... restore --include bin/uncompress --include bin/gunzip -t z
And to my surprise I ended up with
z/bin/gunzip
z/bin/uncompress
z/usr/lib/klibc/bin/gunzip
Prefixing the include with a / wont work as the repo does not seem to contain the root prefix when calling the selectFilter(), so it won't match anything. filter.List also does not seem to have any anchoring characters. Seeing it defines ** to match multiple directories, I would guess the intent was to have Match anchor the pattern at the beginning of the string. E.g. it showing behavior of me having typed --include **/bin/gunzip
Output of
restic version
restic 0.4.0 (v0.4.0-76-g4f5e9e9-dirty)
compiled with go1.8 on linux/amd64
Expected behavior
Two files:
z/bin/gunzip
z/bin/uncompress
Actual behavior
Three files appear:
z/bin/gunzip
z/bin/uncompress
z/usr/lib/klibc/bin/gunzip
Steps to reproduce the behavior
have a repository, backed up from / with both say
/bin/fileA
/usr/bin/fileA
$ restic -r ... restore --include bin/fileA -t z
you end up with both files under z/
The text was updated successfully, but these errors were encountered: