Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

WIP: Add mount command #973

wants to merge 3 commits into from

Conversation

aawsome
Copy link
Member

@aawsome aawsome commented Dec 26, 2023

This PR adds the mount command to rustic to access snapshot contents as a read-only filesystem.

As for the webdav command, there are following options:

  • Access to a concrete snapshot/path, e.g. rustic mount /mnt 37a63e5b:/my/path.
  • Access to all snapshots (maybe restricted by filters) by using templates to define a virtual directory structure where snapshots are located. Example: rustic mount /mnt --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 a latest entry is generated. latest and identical subsequent snapshots are symlinks when using mount.

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

closes #971

TODO:

  • update Cargo.toml once feat: add FuseFs rustic_core#156 has been merged into rustic_core -> no longer needed
  • add mount options, see discussion below
  • Adjust CI-Pipeline to use fues libraries

@aawsome aawsome changed the title Add mount command WIP: Add mount command Dec 26, 2023
@aawsome aawsome mentioned this pull request Dec 26, 2023
src/commands/mount/fs.rs Outdated Show resolved Hide resolved
src/commands/mount.rs Outdated Show resolved Hide resolved
src/commands/mount/fs.rs Outdated Show resolved Hide resolved
src/commands/mount.rs Outdated Show resolved Hide resolved
@aawsome aawsome changed the title WIP: Add mount command WIP: Add mount&webdav command Jan 10, 2024
@aawsome aawsome changed the title WIP: Add mount&webdav command WIP: Add mount command Jan 28, 2024
@aawsome aawsome marked this pull request as draft January 29, 2024 00:13
@aawsome aawsome marked this pull request as ready for review June 19, 2024 06:40
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.

mount command
3 participants