-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add mount command #973
base: main
Are you sure you want to change the base?
Conversation
let node = | ||
repo.node_from_snapshot_path(&self.snap, |sn| config.snapshot_filter.matches(sn))?; | ||
|
||
let options = [OsStr::new("-o"), OsStr::new("fsname=rusticfs")]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to add additional options from command line?
Eq. rustic mount -o allow_other
or rustic mount -o default_permissions
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Also if there are sensible defaults, we should try to use them. What are good defaults in you opinion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imho, kernel_cache
, allow_other
, and default_permissions
are going to be the right choice most of the time.
(For example, without allow_other
, a fs mounted in toolbox (or any other container) would appear empty in gui file manager running outside of the container)
It probably might be sometimes useful to disable allow_other
and default_permissions
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add kernel_cache
to the options.
I am wondering if we should just add an option like _no_allow_other
to the mount
command which then unsets both allow_other
and default_permission
- and without this option just set both...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds good.
Co-authored-by: Jan Jedelský <8687359+jjedelsky@users.noreply.github.com>
This PR adds the
mount
and thewebdav
command to rustic to access snapshot contents as a read-only filesystem.For BOTH commands there are following options:
rustic mount /mnt 37a63e5b:/my/path
.rustic webdav 127.0.0.1:4999 --path-template "[{hostname}]/[{label}]/{time}" --time-template "%Y-%m-%d_%H-%M-%S"
(these are also defined as default). Note that for all dirs containing only snapshots, also alatest
entry is generated.latest
and identical subsequent snapshots are symlinks when usingmount
and optionally symlinks when usingwebdav
.Depends on rustic-rs/rustic_core#106 and is based on #966
This PR uses fuse_mt which is not optimal as it introduces some overhead (e.g. needs to save whole Paths in-memory).
TODO: