When mounting a repository, restic says Don't forget to umount after quitting!. If I interrupt restic’s mount process, there’s nothing to umount. If I do umount /mnt/restic while it’s still running, restic says unable to umount (maybe already umounted?): exit status 1: fusermount: entry for /mnt/restic not found in /etc/mtab.
@ZeliTheZealot Can you please elaborate on what you think is currently unclear in the output from restic in regard to the mount?
It currently looks like this when just doing the mount in order to browse the mount point:
% ./restic mount mnt
repository baffc29d opened (version 2, compression level auto)
[0:00] 100.00% 2 / 2 index files loaded
Now serving the repository at mnt
Use another terminal or tool to browse the contents of this folder.
When finished, quit with Ctrl-c here or umount the mountpoint.
It currently looks like this when doing the mount and then unmounting the mount point in another terminal (i.e. it just quits, which seems sensible):
% ./restic mount mnt
repository baffc29d opened (version 2, compression level auto)
[0:00] 100.00% 2 / 2 index files loaded
Now serving the repository at mnt
Use another terminal or tool to browse the contents of this folder.
When finished, quit with Ctrl-c here or umount the mountpoint.
%
my_computer_name:~ root# restic mount mount_location &
[1] PID
my_computer_name:~ root# repository NUMBER opened (version 2, compression level auto)
[0:00] 100.00% 1 / 1 index files loaded
Now serving the repository at mount_location
Use another terminal or tool to browse the contents of this folder.
When finished, quit with Ctrl-c here or umount the mountpoint.
When umounting via killing the background process:
my_computer_name:test_backup root# kill PID
signal terminated received, cleaning up
unable to umount (maybe already umounted or still in use?): unmount mount_location: resource busy
[1]+ Done restic mount mount_location (wd: ~)
The restic version is:
restic 0.18.1 compiled with go1.25.5 on darwin/amd64
% ./restic mount mnt &
[1] 47433
% repository baffc29d opened (version 2, compression level auto)
[0:00] 100.00% 2 / 2 index files loaded
Now serving the repository at mnt
Use another terminal or tool to browse the contents of this folder.
When finished, quit with Ctrl-c here or umount the mountpoint.
signal terminated received, cleaning up
[1] + done ./restic mount mnt
The last line showed up only when I killed the restic process in a second terminal.
You are right, I could have killed it in the same terminal. Here it is:
% ./restic mount mnt &
[1] 3382
% repository baffc29d opened (version 2, compression level auto)
[0:00] 100.00% 2 / 2 index files loaded
Now serving the repository at mnt
Use another terminal or tool to browse the contents of this folder.
When finished, quit with Ctrl-c here or umount the mountpoint.
% kill 3382
signal terminated received, cleaning up
[1] + done ./restic mount mnt
I don’t see any problems or error messages in there. And we seem to be on the same operating system (although I’m on an older macOS version in this example than you probably are) and the same restic version (albeit built with different Go versions):
% ./restic version
restic 0.18.1 (v0.18.1-0-g7d0aa7f2e) compiled with go1.23.5 on darwin/arm64