borg icon indicating copy to clipboard operation
borg copied to clipboard

Not able to mount due to FUSE issue

Open athulpa opened this issue 11 months ago • 7 comments

This issue is similar to Issue 8388. However, the solution there didn't work for me.

I installed borg 1.4.0 on my raspberry pi 5, by using the standalone binaries from bauerj.eu - ARMv8 version.

I am able to create backups, run the "check", "info", "list" commands, and extract an archive as well.

However, the "borg mount" command is not working due to some issue with FUSE.

COMMAND: ./borg mount <path to borg repo> ~/borgmount # I'm mounting a repo, not an archive

ERROR MSG: Runtime Error: borg mount not available: no FUSE support, BORG_FUSE_IMPL=pyfuse3,llfuse.

What I tried (these didn't solve the original error):

  1. apt install python3-pyfuse3
  2. apt install fuse3
  3. apt install libfuse3-dev

Some further comments:

  1. I understand that FUSE is a userspace driver that is used to mount virtual filesystems, and the borg documentation gave me a good idea of how this works with borg mount.

  2. I wonder if FUSE is not included in the standalone binary at all?

  3. The installation instructions give the impression that the standalone binaries are the best way to install borg. At the least, it doesn't mention anything about the mount feature not working or needing some other dependencies for it to work. If this is indeed the problem, there should be a doc update (in the installation page) warning new users that standalone binaries don't support FUSE/"borg mount". Meanwhile, how can I get FUSE to work with the standalone binary?

athulpa avatar Jan 26 '25 21:01 athulpa

Also, I am able to use fuse-based drivers like ntfs-3g on my system - so this means I must have some version of fuse?

athulpa avatar Jan 26 '25 21:01 athulpa

@athulpa I don't know if that is an issue with that binary, you could ask bauerj.

Also, you could try to reproduce without using the binary, see our docs how to install using pip.

ThomasWaldmann avatar Jan 26 '25 23:01 ThomasWaldmann

The issue has been posted on bauerj's repo as Issue 13.

athulpa avatar Jan 31 '25 02:01 athulpa

@ThomasWaldmann , I couldn't install using pip, with these instructions.

It can't find a dependency installed on my system, maybe related to the same error that I got from the borg executable? Thanks for your time.

INSTALLATION ERROR:

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting borgbackup[llfuse]
  Using cached borgbackup-1.4.0.tar.gz (3.8 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      Traceback (most recent call last):
        File "/home/athul/borg-env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
          main()
        File "/home/athul/borg-env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/athul/borg-env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-715_2tvn/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-715_2tvn/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-715_2tvn/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 320, in run_setup
          exec(code, locals())
        File "<string>", line 134, in <module>
        File "<string>", line 125, in lib_ext_kwargs
      Exception: Could not find crypto lib/headers, please set BORG_OPENSSL_PREFIX or ensure libcrypto.pc is in PKG_CONFIG_PATH.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

athulpa avatar Jan 31 '25 03:01 athulpa

Exception: Could not find crypto lib/headers, please set BORG_OPENSSL_PREFIX or ensure libcrypto.pc is in PKG_CONFIG_PATH.

When installing from source (that includes the pip package), you need to first install the OS-level requirements, see our install docs:

https://borgbackup.readthedocs.io/en/stable/installation.html#from-source

ThomasWaldmann avatar Jan 31 '25 11:01 ThomasWaldmann

I ran into the very same problem when trying to mount a backup. I‘m running the same binary on raspberry pi. This feature used to work but it’s some time ago that I mounted a backup (if so ist was successfull).

sudo -E borg mount --debug --foreground -allow_other /media/myCloudBackup/ncp_tar_borgbackups::nextcloud-bkp_20230701_1688173206.tar.gz /tmp/mnt/ using builtin fallback logging configuration 33 self tests completed in 1.19 seconds Runtime Error: borg mount not available: no FUSE support, BORG_FUSE_IMPL=pyfuse3,llfuse. Traceback (most recent call last): File "borg/archiver.py", line 5391, in main File "borg/archiver.py", line 5309, in run File "borg/archiver.py", line 1350, in do_mount borg.helpers.errors.RTError: Runtime Error: borg mount not available: no FUSE support, BORG_FUSE_IMPL=pyfuse3,llfuse.

Platform: Linux nextcloudpi-64bit 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 Linux: Unknown Linux
Borg: 1.4.0 Python: CPython 3.12.4 msgpack: 1.0.8 fuse: None [pyfuse3,llfuse] PID: 145423 CWD: /home/piadmin sys.argv: ['borg', 'mount', '--debug', '--foreground', '-allow_other', '/media/myCloudBackup/ncp_tar_borgbackups::nextcloud-bkp_20230701_1688173206.tar.gz', '/tmp/mnt/'] SSH_ORIGINAL_COMMAND: None

And here the installed packages:

apt list --installed fuse Listing... Done exfat-fuse/stable,now 1.3.0+git20220115-2 arm64 [installed] fuse3/stable,now 3.14.0-4 arm64 [installed] libfuse2/stable,now 2.9.9-6+b1 arm64 [installed,automatic] libfuse3-3/stable,now 3.14.0-4 arm64 [installed,automatic] libfuse3-dev/stable,now 3.14.0-4 arm64 [installed] python3-llfuse/stable,now 1.4.1+dfsg-2+b3 arm64 [installed] python3-pyfuse3/stable,now 3.2.1-2+b2 arm64 [installed]

CarlosCastaneda avatar Feb 02 '25 09:02 CarlosCastaneda

This happened to me too, but with borg installed via pipx. As discussed in #8388, this is not a problem of borg. In my case, I had installed borg through pipx install borgbackup[pyfuse3]. This compiles pyfuse3 locally into a wheel. At some point, libfuse3 got an update on my system, changing out libfuse3.so.3 with libfuse3.so.4. Now, importing pyfuse3 failed in borg, causing this error when using borg mount. Unfortunately, the error raised in borg obfuscated the actual error that import pyfuse3 failed because libfuse3.so.3 could not be found.

Reinstalling through pipx reinstall borgbackup might not fix this as it will use the cached wheel for pyfuse3. Reinstalling ignoring the cache works with pipx install -f 'borgbackup[pyfuse3]' --pip-args='--no-cache-dir'.

What this all means for this issue: the bauerj borg binary might somehow not be compatible with the fuse implementation of your system.

poettig avatar Aug 02 '25 22:08 poettig