$ restic version
restic 0.14.0 compiled with go1.19 on linux/amd64
Needing to recover part of my DayPlanner from backup, I tried a restore from my primary backup:
$ restic -p /media/tomc/SD-128GB-1/scratch/ssap -r /media/tomc/seagate-3/galp5-kubuntu-SSD-copy2/dropbox mount /home/tomc/Dropbox/restic-backup/restic-backup-mountpoint/
repository 800c7587 opened (repository version 2) successfully, password is correct
Now serving the repository at /home/tomc/Dropbox/restic-backup/restic-backup-mountpoint/
Use another terminal or tool to browse the contents of this folder.
When finished, quit with Ctrl-c here or umount the mountpoint.
The data appeared to be in …/restic-backup-mountpoint as I expected, but the needed file, while quite visible, could not be opened by any program I tried.
Its property details looked as I would have expected. It was described as having a 1.6 MiB size, with my username as owner, and all permissions allowing access. But it won’t open. Trying to load it into anything gets a null result. Nothing happens.
I had this problem with the restic version installable from the apt package manager (noble 1.2.2-1?). I removed it and installed restic 0.14.0 from the snap store. It has no better luck in accessing the snapshot file.
I then replaced my main backup SSD with a HD backup of it that I update weekly. Trying to access snapshots from that HD got exactly the same result.
There are no error messages of any sort.
I am running the latest version of Kubuntu (Ubuntu years24.04.2 LTS)
Can I provide any other useful information?
I have no idea how to troubleshoot this issue. In maybe a decade of using restic, I have never had a problem accessing a file in a snapshot. Restic has been rock solid for me until now. My backup routine always includes a weekly prune and ...check --read-data run on each of my 7 repositories.
Sorry for the delay in responding. I had higher priorities elsewhere. Now, this is a high priority.
Your questions:
Can you check what happens with the latest restic version? (direct download from here - just drop the binary in /usr/bin and make it executable)
Downloaded and launched ver. 0.17.3 from that link. It did exactly what the snap version did: the repository was opened and the desired file to restore was there - a libreoffice calc spreadsheet file. But, as before, libreoffice does not open it. Libreoffice is running fine, constantly on my laptop. But it does nothing with the file I want to restore. No error message. Nothing. I have executed this precise restore many times in the past without any problems.
What kind of a file are you trying to open? Libreoffice Calc spreadsheet file
Are you trying in terminal or Dolphin? Trying in Krusader file manager ver. 2.8.1
If Dolphin, is there a program associated with the file type? In Dolphin, as in Krusader, the associated file type is correct: Libreoffice Calc, but it doesn’t open the file in Dolphin either.
Can you copy the file to your local disk and open it from there? YES! Great idea. And I was able to finish my file restoration. My backup, incidentally, resides on a USB SSD, if I haven’t mentioned it before.
What about other files? Can any of them be opened? Not from the mountpoint, no. But when copied to another dir elsewhere, yes.
So, I am very relieved that I have a procedure for accessing my backups, but it seems that we have a problem possibly with restic. How can I help fix this, at this point?
It is not a bug - restic mount is not a full featured POSIX filesystem so it is not surprise that some programs might not be able to open files from it directly.
As you already discovered - copy what you need to your local drive and then all will be fine. Beyond poking around your shanpshots, ability to copy data from mount to local is its main raison d’etre.
Other point to remember is that mount is considerably slower than proper restic restore. So it is really only useful when you want to restore handful of files.
Very interesting. It’s curious that until now, I have (for years) been able to restore directly from the snaphot file. I was doing this in very recent months, although I cannot give an exact date. Three months ago - likely. For sure within the past 6 months, with same OS, same backup procedure, same bash files managing the whole deal. And then suddenly it won’t fly.
But as long as I can access the data with this simple change, all is well.
Well. I think we found the issue. Now that I think carefully, previously I was indeed copying a file from the snapshot to my drive because the drive file was messed up and I just needed to replace it.
But what I was doing this time was entirely different, as you just pointed out. I was trying to open the snapshot file from the mountpoint. I don’t think I’ve ever tried that before.
This is a thinking error on my part. Well, that’s by far the easier error to fix, at least in this case!
Thanks for your response, as we’ve now found the problem. Very good.
I just tried opening an xlsx and an odt file using LibreOffice directly from a mounted restic repository and it worked perfectly fine. A restic mount is posix-compliant enough that every software that can handle read-only file systems should be able to work with it. In my case LibreOffice (25.2.1.2) showed a warning that the file is read-only but worked otherwise.