Feature Request - List borgfs mounts
- Dominant language
- Python
- Stars
- 13.7k
- Forks
- 875
- Avg merge
- 11h 15m
- Merged PRs (30d)
- 192
Description
`borg mount`
In addition to displaying help and usage for the mount command, `borg mount` can list the currently mounted borg filesystems.
Here is shell command which produces clean output:
`mount | grep borgfs | sed -e 's/borgfs on \(.*\) type.*/\1/'`
output would be:
`/mount/your-mount-point`
Here is a python one-liner which does the same without requiring any new imports to archiver.py:
```
print(re.sub(r".*borgfs (.*) fuse ro,.*", "\\1", "\n".join(s for s in open('/proc/mounts').read().split('\n') if 'borgfs' in s)))
```
If interested I can clean up the one-liner and create a PR. Since this just reads /proc/mounts, this won't work with Windows (not sure about cygwin).
This is easy to test in python shell:
```
import re
print(re.sub(r".*borgfs (.*) fuse ro,.*", "\\1", "\n".join(s for s in open('/proc/mounts').read().split('\n') if 'borgfs' in s)))
```
Contributor guide
Assessment
This issue has not been assessed yet.