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

Add support for mounting and unmounting archives and repositories #4

Merged
merged 4 commits into from
May 5, 2023

Conversation

dpbriggs
Copy link
Contributor

This commit adds the mount and umount commands and associated options. The implementation was very similar to how prune was implemented. I tested the changes by pointing borgtui to these changes:

$ cargo run -q -- -p real mount ssh://<my-repo>/./repo test-mount
$ ls -l test-mount
real-2023-04-23:16:25:20
real-2023-04-23:23:27:23
...
$ cargo run -q -- -p real umount test-mount
$ ls -l test-mount
$

This commit adds the `mount` and `umount` commands and associated options.
The implementation was very similar to how prune was implemented. I tested the
changes by pointing borgtui to these changes:

```
$ cargo run -q -- -p real mount ssh://<my-repo>/./repo test-mount
$ ls -l test-mount
real-2023-04-23:16:25:20
real-2023-04-23:23:27:23
...
$ cargo run -q -- -p real umount test-mount
$ ls -l test-mount
$
```
Copy link
Owner

@myOmikron myOmikron left a comment

Choose a reason for hiding this comment

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

Thanks for another PR :)

src/errors.rs Outdated Show resolved Hide resolved
src/sync/mount.rs Outdated Show resolved Hide resolved
src/sync/mount.rs Outdated Show resolved Hide resolved
src/common.rs Outdated Show resolved Hide resolved
src/asynchronous/mount.rs Outdated Show resolved Hide resolved
src/asynchronous/mount.rs Outdated Show resolved Hide resolved
src/common.rs Show resolved Hide resolved
Unfortunately borg doesn't seem to handle umount errors gracefully nor
provides message IDs for common mount failures (directory doesn't exist, etc)
@myOmikron myOmikron self-requested a review May 3, 2023 17:48
src/errors.rs Outdated Show resolved Hide resolved
@myOmikron myOmikron merged commit c095a71 into myOmikron:main May 5, 2023
@myOmikron
Copy link
Owner

Do you plan on adding more methods?

If so, I'd wait with a new release.

Unfortunaly, I currently don't have the time, to implement more myself, but I'm happy to review PRs :)

@dpbriggs
Copy link
Contributor Author

dpbriggs commented May 5, 2023

Thanks for your patience with this PR!

Do you plan on adding more methods?

I plan on adding archive contents and borg support but that might be a few weeks away. Depending on what borgtui needs I'll add more methods. I'm thinking I'll bundle writing all of them and make a few PRs at the same time

@myOmikron
Copy link
Owner

Okay, than I'll issue the release right now, and another for the other methods

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.

2 participants