From 239763e3dc2958af6f108ebb9974c9f7adcaf930 Mon Sep 17 00:00:00 2001 From: MartinKurtz <108140017+MartinKurtz@users.noreply.github.com> Date: Mon, 19 Jan 2026 16:36:12 +0100 Subject: [PATCH 1/9] add #9255 warning to mount_cmds.py --- src/borg/archiver/mount_cmds.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/borg/archiver/mount_cmds.py b/src/borg/archiver/mount_cmds.py index 2acae843e8..d37d8cb47b 100644 --- a/src/borg/archiver/mount_cmds.py +++ b/src/borg/archiver/mount_cmds.py @@ -79,6 +79,11 @@ def build_parser_mount_umount(self, subparsers, common_parser, mid_common_parser archives and the directory structure below these will be loaded on-demand from the repository when entering these directories, so expect some delay. + Care should be taken, as Borg backs up symlinks as-is. When an archive + or repository is mounted, it is possible to “jump” outside the mount point + by following a symlink. If this happens, files or directories (or versions of them) + that are not part of the archive or repository may appear to be within the mount point. + Unless the ``--foreground`` option is given, the command will run in the background until the filesystem is ``unmounted``. From b0863663a6b3b2a2f20381a56723cce12354e94e Mon Sep 17 00:00:00 2001 From: MartinKurtz <108140017+MartinKurtz@users.noreply.github.com> Date: Mon, 19 Jan 2026 16:38:42 +0100 Subject: [PATCH 2/9] add #9255 warning to mount command --- src/borg/fuse.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/borg/fuse.py b/src/borg/fuse.py index 4138c430b0..b267ab7f2d 100644 --- a/src/borg/fuse.py +++ b/src/borg/fuse.py @@ -565,6 +565,7 @@ def pop_option(options, key, present, not_present, wanted_type, int_base=0): ) self._create_filesystem() llfuse.init(self, mountpoint, options) + logger.warning('Warning: The mounted archive is capable of containing symlinks that point outside the archive tree. When following such symlinks you may see files and directories within the mountpoint that do not reflect the archive content.') if not foreground: if isinstance(self.repository_uncached, RemoteRepository): daemonize() From 8488ea4c2be67534ab5237d0589fc58e533087a4 Mon Sep 17 00:00:00 2001 From: MartinKurtz <108140017+MartinKurtz@users.noreply.github.com> Date: Mon, 19 Jan 2026 16:48:32 +0100 Subject: [PATCH 3/9] Alter formatting of logger call for #9255 warning --- src/borg/fuse.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/borg/fuse.py b/src/borg/fuse.py index b267ab7f2d..683c5497db 100644 --- a/src/borg/fuse.py +++ b/src/borg/fuse.py @@ -565,7 +565,9 @@ def pop_option(options, key, present, not_present, wanted_type, int_base=0): ) self._create_filesystem() llfuse.init(self, mountpoint, options) - logger.warning('Warning: The mounted archive is capable of containing symlinks that point outside the archive tree. When following such symlinks you may see files and directories within the mountpoint that do not reflect the archive content.') + logger.warning( + "Warning: The mounted archive is capable of containing symlinks that point outside the archive tree. When following such symlinks you may see files and directories within the mountpoint that do not reflect the archive content." + ) if not foreground: if isinstance(self.repository_uncached, RemoteRepository): daemonize() From ae50d26ee055af95e2a3db6773cec236b55a604a Mon Sep 17 00:00:00 2001 From: MartinKurtz <108140017+MartinKurtz@users.noreply.github.com> Date: Mon, 19 Jan 2026 16:51:08 +0100 Subject: [PATCH 4/9] Update fuse.py by putting a sting into two line so the ci pipeline shuts up --- src/borg/fuse.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/borg/fuse.py b/src/borg/fuse.py index 683c5497db..48ff98dc37 100644 --- a/src/borg/fuse.py +++ b/src/borg/fuse.py @@ -566,7 +566,8 @@ def pop_option(options, key, present, not_present, wanted_type, int_base=0): self._create_filesystem() llfuse.init(self, mountpoint, options) logger.warning( - "Warning: The mounted archive is capable of containing symlinks that point outside the archive tree. When following such symlinks you may see files and directories within the mountpoint that do not reflect the archive content." + "Warning: The mounted archive is capable of containing symlinks that point outside the archive tree.\ + When following such symlinks you may see files and directories within the mountpoint that do not reflect the archive content." ) if not foreground: if isinstance(self.repository_uncached, RemoteRepository): From 08f54f942bf6973190f67f0e09aaecfba5f0202e Mon Sep 17 00:00:00 2001 From: MartinKurtz <108140017+MartinKurtz@users.noreply.github.com> Date: Mon, 19 Jan 2026 16:52:50 +0100 Subject: [PATCH 5/9] Update fuse.py putting the string for the #9255 warning into 3 lines so the line becomes shorter --- src/borg/fuse.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/borg/fuse.py b/src/borg/fuse.py index 48ff98dc37..1e06774464 100644 --- a/src/borg/fuse.py +++ b/src/borg/fuse.py @@ -567,7 +567,8 @@ def pop_option(options, key, present, not_present, wanted_type, int_base=0): llfuse.init(self, mountpoint, options) logger.warning( "Warning: The mounted archive is capable of containing symlinks that point outside the archive tree.\ - When following such symlinks you may see files and directories within the mountpoint that do not reflect the archive content." + When following such symlinks you may see files and directories within the mountpoint\ + that do not reflect the archive content." ) if not foreground: if isinstance(self.repository_uncached, RemoteRepository): From 49cbde9fa8d84a37635449fe31b9dadcd5a36b9a Mon Sep 17 00:00:00 2001 From: MartinKurtz <108140017+MartinKurtz@users.noreply.github.com> Date: Mon, 19 Jan 2026 17:11:11 +0100 Subject: [PATCH 6/9] fix formatting on the #9255 mount warning --- src/borg/fuse.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/borg/fuse.py b/src/borg/fuse.py index 1e06774464..147f1da13c 100644 --- a/src/borg/fuse.py +++ b/src/borg/fuse.py @@ -567,8 +567,8 @@ def pop_option(options, key, present, not_present, wanted_type, int_base=0): llfuse.init(self, mountpoint, options) logger.warning( "Warning: The mounted archive is capable of containing symlinks that point outside the archive tree.\ - When following such symlinks you may see files and directories within the mountpoint\ - that do not reflect the archive content." +When following such symlinks you may see files and directories within the mountpoint\ +that do not reflect the archive content." ) if not foreground: if isinstance(self.repository_uncached, RemoteRepository): From 7a8bee7fd539a5a9be9d183d56a78ae908df422f Mon Sep 17 00:00:00 2001 From: MartinKurtz <108140017+MartinKurtz@users.noreply.github.com> Date: Mon, 19 Jan 2026 17:14:24 +0100 Subject: [PATCH 7/9] insert 2 spaces back into #9255 mount warning --- src/borg/fuse.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/borg/fuse.py b/src/borg/fuse.py index 147f1da13c..e8953dd48a 100644 --- a/src/borg/fuse.py +++ b/src/borg/fuse.py @@ -566,8 +566,8 @@ def pop_option(options, key, present, not_present, wanted_type, int_base=0): self._create_filesystem() llfuse.init(self, mountpoint, options) logger.warning( - "Warning: The mounted archive is capable of containing symlinks that point outside the archive tree.\ -When following such symlinks you may see files and directories within the mountpoint\ + "Warning: The mounted archive is capable of containing symlinks that point outside the archive tree. \ +When following such symlinks you may see files and directories within the mountpoint \ that do not reflect the archive content." ) if not foreground: From b9a36331891f275954863f9648b1853901eb92d3 Mon Sep 17 00:00:00 2001 From: MartinKurtz <108140017+MartinKurtz@users.noreply.github.com> Date: Mon, 19 Jan 2026 21:37:17 +0100 Subject: [PATCH 8/9] change way in which multiline string is handled for #9255 warning --- src/borg/fuse.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/borg/fuse.py b/src/borg/fuse.py index e8953dd48a..1617c07a47 100644 --- a/src/borg/fuse.py +++ b/src/borg/fuse.py @@ -566,9 +566,9 @@ def pop_option(options, key, present, not_present, wanted_type, int_base=0): self._create_filesystem() llfuse.init(self, mountpoint, options) logger.warning( - "Warning: The mounted archive is capable of containing symlinks that point outside the archive tree. \ -When following such symlinks you may see files and directories within the mountpoint \ -that do not reflect the archive content." + "Warning: The mounted archive is capable of containing symlinks that point outside the archive tree." + "When following such symlinks you may see files and directories within the mountpoint" + "that do not reflect the archive content." ) if not foreground: if isinstance(self.repository_uncached, RemoteRepository): From ffbd2ca75b88f1f0c3b27916d6a99b68fe3442d7 Mon Sep 17 00:00:00 2001 From: MartinKurtz <108140017+MartinKurtz@users.noreply.github.com> Date: Mon, 19 Jan 2026 21:42:01 +0100 Subject: [PATCH 9/9] add 2 spaces to #9255 warning --- src/borg/fuse.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/borg/fuse.py b/src/borg/fuse.py index 1617c07a47..0d6bc13fa3 100644 --- a/src/borg/fuse.py +++ b/src/borg/fuse.py @@ -566,8 +566,8 @@ def pop_option(options, key, present, not_present, wanted_type, int_base=0): self._create_filesystem() llfuse.init(self, mountpoint, options) logger.warning( - "Warning: The mounted archive is capable of containing symlinks that point outside the archive tree." - "When following such symlinks you may see files and directories within the mountpoint" + "Warning: The mounted archive is capable of containing symlinks that point outside the archive tree. " + "When following such symlinks you may see files and directories within the mountpoint " "that do not reflect the archive content." ) if not foreground: