I just upgraded from FUSE 3.x to 4.x (now called macFUSE) on Big Sur (Macbook Pro 13 / 2017), and I can’t get restic to mount the repository. I’m using restic 0.11.0 compiled with go1.15.3 on darwin/amd64
repository af42bbe4 opened successfully, password is correct
Mountpoint 3 doesn't exist, creating it
cannot locate OSXFUSE
unable to umount (maybe already umounted or still in use?): unmount 3: operation not permitted
Sorry about that, but it’s unlikely we’ll be able to resolve it. Even worse, it’s likely that we’ll have to drop fuse/mount support for macOS entirely. Here’s a bit of background: https://github.com/restic/restic/issues/3096
Is there any other solution I could use to mount and browse a backup repository from MacOS? I guess I could downgrade back to Fuse 3.x, but that likely isn’t sustainable. Docker? Any other ideas?
And then run docker-compose up --build and access the mount at http://localhost:8888. A more complete solution would probably be to start a simple webdav server instead of python http server. Perhaps micromata/dave would be a candidate?
Can anyone where advise the ill-informed, I am trying to spin up the docker container but getting this error:
restic_1 | Fatal: unable to open config file: Stat: stat /Users/david/Desktop/Test/config: no such file or directory
restic_1 | Is there a repository at the following location?
restic_1 | /Users/david/Desktop/Test
the repo+config exists, i can run backup commands on it, but the dockerfile can’t see it.
the previous examples assumed a network endpoint for the restic repository. since you’re trying to use a filesystem path on your mac, you’ll need to expose that to the docker container.
for example, you could add something like the following under volumes:
- /Users/david/Desktop/Test:/root/repo
and then set RESTIC_REPOSITORY to /root/repo.
if you do that, you’ll likely get an os prompt to allow docker access to Desktop that you’ll need to accept.
Just came across this thread, figured I’d post my workaround for anyone else googling…
First, I created a Docker image that loads the required dependencies into Alpine Linux:
$ cat Dockerfile
FROM alpine:latest
RUN apk update && apk add fuse openssh-client restic
RUN mkdir /restic && chmod 777 /restic
$ docker build -t my-restic .
Then I use plain-vanilla Docker (without Compose) to spin up a container that mounts the repository. It passes through /dev/fuse and grants SYS_ADMIN capability, and sends 2 volumes through to the container: ssh keys and a “drop box” to put restored files into. The RESTIC_REPOSITORY and RESTIC_PASSWORD environment variables come from a .envrc file that my shell picks up.
Aside: Yes, I realize passing one’s entire .ssh directory into a Docker container is a bad idea. This is an example; in “production” I’d create a dedicated keypair and only expose those to the container.
Finally, I can use Docker’s exec command to explore the mounted snapshots and copy files into the drop-box:
$ docker exec -it restic ls -a /restic/hosts/<<machine>/latest/<<path>>
.
..
<<files>>
$ docker exec -it restic cp /restic/hosts/<<machine>>/latest/<<path/to/file/i/want>> /dropbox
Mostly this is useful for navigating the snapshots; I realize individual paths can be restored with a standard restic run on my Mac once known, but once the repository is mounted, might as well just use it.