-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Browsing in fuse mounted snapshot gives input/output error #313
Comments
Thanks for reporting this bug. Which version of restic are you using on what platform/OS? Please include the output of You can help us a lot (especially if it's reproducable) by compiling restic with debug support using
This instructs restic to write extensive debug information to the file |
My version is:
And i use Debian, yesterday it was still wheezy, now it is jessie (8.2) - the issue didn't change with the upgrade:
Here the debug log:
And by the way, when i doing "umount /mnt" in another shell, because restic tells me to umount cleanly i get this (last line):
And the restic mount command doesn't come back to shell until it is umounted - but i think that is normal behaivour? |
I'm not able to reproduce the issue, do you maybe have a hint what's different for you? do you have unusual files or file types backed up? Could you try to reproduce this with a backup of a dummy directory and provide instructions on how to build that? |
uhm, well, i backup nearly my whole server with it. This means there are a lot of files and file types of course (symlinks, sockets, etc.). For file types i made some tests: I tried a small dir with sockets, symlinks and even /dev (i think instructions are not needed, okay?). I made a backup of it and mounted and changed into that snapshot dir. All that worked fine! So maybe it has to do with the amount of files (or better said elements) organized by a snapshot? |
How did you call restic for the backup exactly? |
For the (successful) tests just "restic backup /foo/bar". For my whole backup:
|
Is there something unusual in |
I have no idea. It is a typical Debian system with apache, mysql, php(-fpm), postfix, dovecot, proftpd, some java apps and the usual system daemons (systemd, ntp, logcheck, sshd, etc. pp.). I don't know how i could identify something "unusual" out of...
...files. :( |
From what I can see in your bug report, the fuse mount fails when opening the root-directory of the snapshot, so I suspect it's something in the root path... |
I see nothing suspicious, do you?
|
This looks perfectly normal (unfortunately), I'll have to think about how to debug this further. |
How about, generally, bisecting to hone in on the problematic file(s)? |
Good idea, but this needs to be reproduceable for someone who is able to bisect. And for the bisect to be successfull it would need a revision that actually worked in that situation. |
I was suggesting that the original poster do the bisection - maybe deciding to back up each top-level directory independently would lead to some/most of those cases working, and then one or two that do not. |
That's a good idea. @timdeluxe could you try creating a backup of each of the files/dirs in You could start with something like this: |
sure, i did it. Interesting outcome - every single dir is working fine. I had to cancel /proc and /sys (restic ran into errors there), but i am excluding that in my normal backup, as you can see here: #313 (comment) Here you see the output of my test. It pretty much explains itself. At 12:07 it was my regular backup by cron - everything else was the test:
Any other idea? |
Did you do the mount as root? If not, try browsing the directry with the same user account. Fuse restricts the access root has on mounts of regular users... |
All backups and mounts and browsing are done by root - if you would do the backup with another user, i couldn't do the "full" backup, because access will be denied on much stuff... The next thing i can try to do is to exclude more and more directories to find the point where it starts to work - it will take some time, which i currently miss - i hope i am able to do it on the weekend... |
If you do everything as the same user (root) it should work... |
We've recently fixed a bug in the fuse mount (it failed to work properly with empty files) that might be the cause for the issue you reported. Could you please try again? I'm closing this issue for now, please feel free to add a comment, so we can reopen it if the problem persists. |
Sorry for being quiet for ages. Now the mount works excellent. I don't get the reported error anymore. Thanks a lot! |
Thanks for taking the time to leave feedback! |
I just ran into the same issue with restic 0.7.3 and 0.8.0 when using the following script to backup my fritzbox config: export RESTIC_REPOSITORY="$FRITZBOX_RESTIC_REPOSITORY"
export RESTIC_PASSWORD="$FRITZBOX_RESTIC_PASSWORD"
CURL="curl --silent --insecure"
# Login
challenge=$( \
$CURL https://fritz.box/login_sid.lua \
| sed 's/.*<Challenge>\([a-z0-9]*\)<.*/\1/' \
)
response="$challenge-$( \
echo -n "$challenge-$FRITZBOX_LOGIN_PASSWORD" \
| iconv -t UTF-16LE | md5sum -b | cut -d' ' -f1 \
)"
data="response=$response&username=$FRITZBOX_LOGIN_USER"
session=$( \
$CURL --data $data https://fritz.box/login_sid.lua \
| sed 's/.*<SID>\([a-z0-9]*\)<.*/\1/' \
)
# Do backup
$CURL \
--form sid=$session \
--form ImportExportPassword=$FRITZBOX_RESTIC_PASSWORD \
--form ConfigExport= https://fritz.box/cgi-bin/firmwarecfg \
| restic backup \
--hostname fritz.box --tag config \
--stdin --stdin-filename /config/fritzbox.export
# Logout
data="sid=$session&logout=1"
$CURL --data $data https://fritz.box/login_sid.lua -o /dev/null This is on a fresh repository so there shouldn't be any files besides Since the Fritzbox export files are encrypted as well, I might even be able to share the restic repo with you. (I have to double-check that.) |
I am on Debian too: # cat /etc/debian_version
9.3
# uname -a
Linux xxx 4.14.0-00028-gbd8e8ab5145a #8 SMP Thu Nov 16 10:32:35 CET 2017 armv7l GNU/Linux |
Oh, interesting. The filename is not supposed to contain slashes, that is the error. Can you create a new issue about it? Thanks! |
I mounted my repository (sftp backend) like this:
When i then try to browse through the content i get this:
I could reproduce this on two different servers, with each having a different sftp backend.
The text was updated successfully, but these errors were encountered: