Skip to content

mount: append the repository ID to the name of the FUSE mount#5243

Merged
MichaelEischer merged 2 commits into
restic:masterfrom
zmanda:feat-gh-4868-show-repo-id-in-df-and-mount
Apr 2, 2025
Merged

mount: append the repository ID to the name of the FUSE mount#5243
MichaelEischer merged 2 commits into
restic:masterfrom
zmanda:feat-gh-4868-show-repo-id-in-df-and-mount

Conversation

@konidev20

@konidev20 konidev20 commented Feb 8, 2025

Copy link
Copy Markdown
Contributor

What does this PR change? What problem does it solve?

Append the repository ID to the name of the FUSE mount created using the restic mount command. When the user is mounting multiple repositories, this makes it easier to understand which repository is mounted where.

[Edit]
Example output:

[konidev20@vm-1 restic]$ df ./test-mount/
Filesystem      1K-blocks  Used Available Use% Mounted on
restic:d3b07384d1         0     0         0    - /home/konidev20/restic/test-mount

In the above example the ID d3b07384d1 is appended to the filesystem name. This is the first 10 characters of the repository ID.
[/Edited]
Was the change previously discussed in an issue or on the forum?

Closes #4868

Checklist

  • I have added tests for all code changes.
  • I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I'm done! This pull request is ready for review.

@MichaelEischer MichaelEischer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The id part should match that printed in the "created restic repository %v at %s" messages.

Comment thread internal/repository/repository.go Outdated
Comment thread cmd/restic/cmd_mount.go Outdated
@konidev20 konidev20 force-pushed the feat-gh-4868-show-repo-id-in-df-and-mount branch from c328f45 to 3a22af9 Compare March 22, 2025 18:07
@konidev20

Copy link
Copy Markdown
Contributor Author

This is ready for review.

@MichaelEischer

Copy link
Copy Markdown
Member

Please add a changelog entry. I had something like the following in mind: (the inner part is in triple backticks)

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`.

$ df ./test-mount/
Filesystem 1K-blocks Used Available Use% Mounted on
restic:1234567890 0 0 0 - /restic/test-mount


https://github.com/restic/restic/issues/4868
https://github.com/restic/restic/pull/5243

* update review comments

mount: append repository ID to FS name of the FUSE mount
@konidev20 konidev20 force-pushed the feat-gh-4868-show-repo-id-in-df-and-mount branch from 3a22af9 to 6db0d84 Compare March 29, 2025 07:58
@konidev20

Copy link
Copy Markdown
Contributor Author

@MichaelEischer I have added the changelog entry as requested.

@MichaelEischer MichaelEischer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

show repository id in output of df and mount

2 participants