From 88b599c4f3dc923799dc7be268b64d4986ee14fd Mon Sep 17 00:00:00 2001 From: Srigovind Nayak <5201843+konidev20@users.noreply.github.com> Date: Sat, 8 Feb 2025 16:06:03 +0530 Subject: [PATCH 1/2] mount: append repository ID to FS name of FUSE mount * update review comments mount: append repository ID to FS name of the FUSE mount --- cmd/restic/cmd_mount.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/restic/cmd_mount.go b/cmd/restic/cmd_mount.go index 15760c6b7..d2c905460 100644 --- a/cmd/restic/cmd_mount.go +++ b/cmd/restic/cmd_mount.go @@ -5,6 +5,7 @@ package main import ( "context" + "fmt" "os" "strings" "time" @@ -148,9 +149,11 @@ func runMount(ctx context.Context, opts MountOptions, gopts GlobalOptions, args return err } + fuseMountName := fmt.Sprintf("restic:%s", repo.Config().ID[:10]) + mountOptions := []systemFuse.MountOption{ systemFuse.ReadOnly(), - systemFuse.FSName("restic"), + systemFuse.FSName(fuseMountName), systemFuse.MaxReadahead(128 * 1024), } From 6db0d84ab0b03d66915a84cb1e3d8e6af4b32b9a Mon Sep 17 00:00:00 2001 From: Srigovind Nayak <5201843+konidev20@users.noreply.github.com> Date: Sat, 29 Mar 2025 13:27:50 +0530 Subject: [PATCH 2/2] changelog: add changelog entry for issue-4868 --- changelog/unreleased/issue-4868 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 changelog/unreleased/issue-4868 diff --git a/changelog/unreleased/issue-4868 b/changelog/unreleased/issue-4868 new file mode 100644 index 000000000..001f7618b --- /dev/null +++ b/changelog/unreleased/issue-4868 @@ -0,0 +1,14 @@ +Enhancement: Include repository id in filesystem name used by `mount` + +The filesystem created by restic's `mount` command now includes the repository +id in the filesystem name. The repository id is printed by restic when opening +a repository or can be looked up using `restic cat config`. + +``` +[restic-user@hostname restic]$ df ./test-mount/ +Filesystem 1K-blocks Used Available Use% Mounted on +restic:d3b07384d1 0 0 0 - /mnt/my-restic-repo +``` + +https://github.com/restic/restic/issues/4868 +https://github.com/restic/restic/pull/5243 \ No newline at end of file