Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include filter when restoring does not work for for absolute paths #374

Closed
fd0 opened this issue Dec 14, 2015 · 0 comments
Closed

include filter when restoring does not work for for absolute paths #374

fd0 opened this issue Dec 14, 2015 · 0 comments

Comments

@fd0
Copy link
Member

fd0 commented Dec 14, 2015

Create a directory:

$ mkdir -p work/testdir1
$ mkdir -p work/testdir2
$ mkdir -p work/testdir1/work/testdir2
$ echo 1 > work/testdir1/file1
$ echo 2 > work/testdir2/file2
$ echo 3 > work/testdir1/work/testdir2/file3

Backup that:

$ restic backup work
scan [/home/fd0/tmp/work]
scanned 3 directories, 2 files in 0:00
[0:00] 50.00%  0B/s  2B / 4B  0 / 5 items  0 errors  ETA 0:00
duration: 0:00, 0.00MiB/s
snapshot 2ca33cbd saved

$ restic ls 2c
snapshot of [/home/fd0/tmp/work] at 2015-12-14 20:52:45.407130972 +0100 CET:
work
work/testdir1
work/testdir1/file1
work/testdir2
work/testdir2/file2

Restore with an include filter with an absolute pattern:

$ restic restore --target restore --include '/work/testdir2' 2c
restoring <Snapshot of [/home/fd0/tmp/work] at 2015-12-14 20:52:45.407130972 +0100 CET> to restore

This did not restore anything:

$ ls -al restore
ls: cannot access restore: No such file or directory

Observed behavior: Restic restores nothing at all.

Expected behavior: Restic should have restored work/testdir2, but not work/testdir1/work/testdir2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant