restic: Error in restoring a specific file
When I run the command to restore a specific file, the restic return the follow error:
ignoring error for /restore11/usr/local/teste2.txt: OpenFile: open /restore11/usr/local/teste2.txt: is a directory
Output of restic version
(v0.9.1-33-g44fb2a8) compiled with go1.10.3 on linux/amd64
How did you run restic exactly?
restic restore d84bbf60 -t /restore11/ -i "/usr/local/teste2.txt"What backend/server/service did you use to store the repository?
S3 ( DigitalOcean )
Expected behavior
Restic should not convert the file to directoryActual behavior
Restoring specific file from a snapshot , restic convert the first file to directory
Steps to reproduce the behavior
root@gbox:/# restic restore d84bbf60 -t /restore11/ -i "/usr/local/*.txt"
repository 00d74122 opened successfully, password is correct
restoring <Snapshot d84bbf60 of [/usr/local] at 2018-07-01 19:45:00.798260419 +0000 UTC by root@gbox> to /restore11/
ignoring error for /restore11/usr/local/teste2.txt: OpenFile: open /restore11/usr/local/teste2.txt: is a directory
There were 1 errors
Linting the file/directory
root@gbox:/# ls -l /restore11/usr/local/
total 12
drwx------ 2 root root 4096 Jul 1 21:41 teste2.txt
Do you have any idea what may have caused this?
no
Do you have an idea how to solve the issue?
no
Did restic help you or made you happy in any way?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (10 by maintainers)
Commits related to this issue
- restorer: Fix traverseTree traverseTree() was meant to call enterDir() whenever a directory is selected for restore, either explicitly or implicitly (=contains a file which is to be restored). After ... — committed to restic/restic by fd0 6 years ago
- restorer: Fix traverseTree traverseTree() was meant to call enterDir() whenever a directory is selected for restore, either explicitly or implicitly (=contains a file which is to be restored). After ... — committed to restic/restic by fd0 6 years ago
- restorer: Fix traverseTree traverseTree() was meant to call enterDir() whenever a directory is selected for restore, either explicitly or implicitly (=contains a file which is to be restored). After ... — committed to restic/restic by fd0 6 years ago
@ifedorenko please don’t worry about this, it’s perfectly normal and human! I think we’re handling it pretty well, especially by adding more test cases 😃 I agree that the restorer had not enough test cases from the start.
I’m currently working on this, I’ll let you know here in the issue if I hit a wall or so.
Thank you all for your contributions (bug reports and code)!
Sigh. In my defense, there were no tests that covered restore with includes of specific files 😉 I think I can have the fix ready for review later today (eastern time). Let me know if you are interested.